php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
dasm_x86.h File Reference
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  dasm_Section
 
struct  dasm_State
 

Macros

#define DASM_ARCH   "x86"
 
#define DASM_EXTERN(a, b, c, d)
 
#define DASM_MAXSECPOS   25
 
#define DASM_S_OK   0x00000000
 
#define DASM_S_NOMEM   0x01000000
 
#define DASM_S_PHASE   0x02000000
 
#define DASM_S_MATCH_SEC   0x03000000
 
#define DASM_S_RANGE_I   0x11000000
 
#define DASM_S_RANGE_SEC   0x12000000
 
#define DASM_S_RANGE_LG   0x13000000
 
#define DASM_S_RANGE_PC   0x14000000
 
#define DASM_S_RANGE_VREG   0x15000000
 
#define DASM_S_UNDEF_L   0x21000000
 
#define DASM_S_UNDEF_PC   0x22000000
 
#define DASM_POS2IDX(pos)
 
#define DASM_POS2BIAS(pos)
 
#define DASM_SEC2POS(sec)
 
#define DASM_POS2SEC(pos)
 
#define DASM_POS2PTR(D, pos)
 
#define DASM_PSZ(ms)
 
#define DASM_PTR_SUB(p1, off)
 
#define DASM_PTR_ADD(p1, off)
 
#define CK(x, st)
 
#define CKPL(kind, st)
 
#define dasmb(x)
 
#define dasmw(x)
 
#define dasmd(x)
 
#define dasmq(x)
 
#define dasma(x)
 

Typedefs

typedef const unsigned char * dasm_ActList
 
typedef struct dasm_Section dasm_Section
 

Enumerations

enum  {
  DASM_DISP = 233 , DASM_IMM_S , DASM_IMM_B , DASM_IMM_W ,
  DASM_IMM_D , DASM_IMM_WB , DASM_IMM_DB , DASM_VREG ,
  DASM_SPACE , DASM_SETLABEL , DASM_REL_A , DASM_REL_LG ,
  DASM_REL_PC , DASM_IMM_LG , DASM_IMM_PC , DASM_LABEL_LG ,
  DASM_LABEL_PC , DASM_ALIGN , DASM_EXTERN , DASM_ESC ,
  DASM_MARK , DASM_SECTION , DASM_STOP
}
 

Functions

void dasm_init (Dst_DECL, int maxsection)
 
void dasm_free (Dst_DECL)
 
void dasm_setupglobal (Dst_DECL, void **gl, unsigned int maxgl)
 
void dasm_growpc (Dst_DECL, unsigned int maxpc)
 
void dasm_setup (Dst_DECL, const void *actionlist)
 
void dasm_put (Dst_DECL, int start,...)
 
int dasm_link (Dst_DECL, size_t *szp)
 
typedef IR_SET_ALIGNED (1, unsigned short unaligned_short)
 
typedef IR_SET_ALIGNED (1, unsigned int unaligned_int)
 
typedef IR_SET_ALIGNED (1, unsigned long long unaligned_long_long)
 
int dasm_encode (Dst_DECL, void *buffer)
 
int dasm_getpclabel (Dst_DECL, unsigned int pc)
 

Macro Definition Documentation

◆ CK

#define CK ( x,
st )
Value:
((void)0)
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)

Definition at line 160 of file dasm_x86.h.

◆ CKPL

#define CKPL ( kind,
st )
Value:
((void)0)

Definition at line 161 of file dasm_x86.h.

◆ DASM_ARCH

#define DASM_ARCH   "x86"

Definition at line 12 of file dasm_x86.h.

◆ DASM_EXTERN

#define DASM_EXTERN ( a,
b,
c,
d )
Value:
0

Definition at line 15 of file dasm_x86.h.

◆ DASM_MAXSECPOS

#define DASM_MAXSECPOS   25

Definition at line 28 of file dasm_x86.h.

◆ DASM_POS2BIAS

#define DASM_POS2BIAS ( pos)
Value:
((pos)&0xff000000)
unsigned const char * pos
Definition php_ffi.h:52

Definition at line 45 of file dasm_x86.h.

◆ DASM_POS2IDX

#define DASM_POS2IDX ( pos)
Value:
((pos)&0x00ffffff)

Definition at line 44 of file dasm_x86.h.

◆ DASM_POS2PTR

#define DASM_POS2PTR ( D,
pos )
Value:
(D->sections[DASM_POS2SEC(pos)].rbuf + (pos))
#define DASM_POS2SEC(pos)
Definition dasm_arm.h:49
#define D(d)

Definition at line 48 of file dasm_x86.h.

◆ DASM_POS2SEC

#define DASM_POS2SEC ( pos)
Value:
((pos)>>24)

Definition at line 47 of file dasm_x86.h.

◆ DASM_PSZ

#define DASM_PSZ ( ms)
Value:
(sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section))

Definition at line 80 of file dasm_x86.h.

◆ DASM_PTR_ADD

#define DASM_PTR_ADD ( p1,
off )
Value:
((void *) ((uintptr_t) (p1) + sizeof(*p1) * (uintptr_t) (off)))

Definition at line 84 of file dasm_x86.h.

◆ DASM_PTR_SUB

#define DASM_PTR_SUB ( p1,
off )
Value:
((void *) ((uintptr_t) (p1) - sizeof(*p1) * (uintptr_t) (off)))

Definition at line 83 of file dasm_x86.h.

◆ DASM_S_MATCH_SEC

#define DASM_S_MATCH_SEC   0x03000000

Definition at line 34 of file dasm_x86.h.

◆ DASM_S_NOMEM

#define DASM_S_NOMEM   0x01000000

Definition at line 32 of file dasm_x86.h.

◆ DASM_S_OK

#define DASM_S_OK   0x00000000

Definition at line 31 of file dasm_x86.h.

◆ DASM_S_PHASE

#define DASM_S_PHASE   0x02000000

Definition at line 33 of file dasm_x86.h.

◆ DASM_S_RANGE_I

#define DASM_S_RANGE_I   0x11000000

Definition at line 35 of file dasm_x86.h.

◆ DASM_S_RANGE_LG

#define DASM_S_RANGE_LG   0x13000000

Definition at line 37 of file dasm_x86.h.

◆ DASM_S_RANGE_PC

#define DASM_S_RANGE_PC   0x14000000

Definition at line 38 of file dasm_x86.h.

◆ DASM_S_RANGE_SEC

#define DASM_S_RANGE_SEC   0x12000000

Definition at line 36 of file dasm_x86.h.

◆ DASM_S_RANGE_VREG

#define DASM_S_RANGE_VREG   0x15000000

Definition at line 39 of file dasm_x86.h.

◆ DASM_S_UNDEF_L

#define DASM_S_UNDEF_L   0x21000000

Definition at line 40 of file dasm_x86.h.

◆ DASM_S_UNDEF_PC

#define DASM_S_UNDEF_PC   0x22000000

Definition at line 41 of file dasm_x86.h.

◆ DASM_SEC2POS

#define DASM_SEC2POS ( sec)
Value:
((sec)<<24)

Definition at line 46 of file dasm_x86.h.

◆ dasma

#define dasma ( x)
Value:
(cp = dasma_(cp, (x)))

Definition at line 392 of file dasm_x86.h.

◆ dasmb

#define dasmb ( x)
Value:
*cp++ = (unsigned char)(x)

Definition at line 368 of file dasm_x86.h.

◆ dasmd

#define dasmd ( x)
Value:
do { *((unaligned_int *)cp) = (unsigned int)(x); cp+=4; } while (0)

Definition at line 375 of file dasm_x86.h.

◆ dasmq

#define dasmq ( x)
Value:
do { *((unaligned_long_long *)cp) = (unsigned long long)(x); cp+=8; } while (0)

Definition at line 377 of file dasm_x86.h.

◆ dasmw

#define dasmw ( x)
Value:
do { *((unaligned_short *)cp) = (unsigned short)(x); cp+=2; } while (0)

Definition at line 373 of file dasm_x86.h.

Typedef Documentation

◆ dasm_ActList

typedef const unsigned char* dasm_ActList

Definition at line 51 of file dasm_x86.h.

◆ dasm_Section

typedef struct dasm_Section dasm_Section

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DASM_DISP 
DASM_IMM_S 
DASM_IMM_B 
DASM_IMM_W 
DASM_IMM_D 
DASM_IMM_WB 
DASM_IMM_DB 
DASM_VREG 
DASM_SPACE 
DASM_SETLABEL 
DASM_REL_A 
DASM_REL_LG 
DASM_REL_PC 
DASM_IMM_LG 
DASM_IMM_PC 
DASM_LABEL_LG 
DASM_LABEL_PC 
DASM_ALIGN 
DASM_EXTERN 
DASM_ESC 
DASM_MARK 
DASM_SECTION 
DASM_STOP 

Definition at line 19 of file dasm_x86.h.

Function Documentation

◆ dasm_encode()

int dasm_encode ( Dst_DECL ,
void * buffer )

Definition at line 395 of file dasm_x86.h.

◆ dasm_free()

void dasm_free ( Dst_DECL )

Definition at line 105 of file dasm_x86.h.

◆ dasm_getpclabel()

int dasm_getpclabel ( Dst_DECL ,
unsigned int pc )

Definition at line 513 of file dasm_x86.h.

◆ dasm_growpc()

void dasm_growpc ( Dst_DECL ,
unsigned int maxpc )

Definition at line 126 of file dasm_x86.h.

◆ dasm_init()

void dasm_init ( Dst_DECL ,
int maxsection )

Definition at line 87 of file dasm_x86.h.

◆ dasm_link()

int dasm_link ( Dst_DECL ,
size_t * szp )

Definition at line 277 of file dasm_x86.h.

◆ dasm_put()

void dasm_put ( Dst_DECL ,
int start,
... )

Definition at line 165 of file dasm_x86.h.

◆ dasm_setup()

void dasm_setup ( Dst_DECL ,
const void * actionlist )

Definition at line 135 of file dasm_x86.h.

◆ dasm_setupglobal()

void dasm_setupglobal ( Dst_DECL ,
void ** gl,
unsigned int maxgl )

Definition at line 118 of file dasm_x86.h.

◆ IR_SET_ALIGNED() [1/3]

typedef IR_SET_ALIGNED ( 1 ,
unsigned int unaligned_int )

◆ IR_SET_ALIGNED() [2/3]

typedef IR_SET_ALIGNED ( 1 ,
unsigned long long unaligned_long_long )

◆ IR_SET_ALIGNED() [3/3]

typedef IR_SET_ALIGNED ( 1 ,
unsigned short unaligned_short )