CACAO
Data Structures | Macros | Typedefs | Functions | Variables
codegen.c File Reference

Go to the source code of this file.

Data Structures

struct  builtin_gen
 

Macros

#define gen_branch(_inst)
 
#define index2offset(_i)   (-(_i) * SIZEOF_VOID_P)
 
#define I(value)   iptr[0].sx.val.i = (value); break;
 
#define COMPILERSTUB_DATASIZE   2
 
#define COMPILERSTUB_CODESIZE   4
 
#define COMPILERSTUB_SIZE   COMPILERSTUB_DATASIZE + COMPILERSTUB_CODESIZE
 

Typedefs

typedef void(* genfunctionptr )(codegendata *)
 
typedef struct builtin_gen builtin_gen
 

Functions

void genarg_v (codegendata *cd1, Cell v)
 
void genarg_i (codegendata *cd1, s4 i)
 
void genarg_b (codegendata *cd1, s4 i)
 
void genarg_f (codegendata *cd1, float f)
 
void genarg_l (codegendata *cd1, s8 l)
 
void genarg_aRef (codegendata *cd1, java_objectheader *a)
 
void genarg_aArray (codegendata *cd1, java_arrayheader *a)
 
void genarg_aaTarget (codegendata *cd1, Inst **a)
 
void genarg_aClass (codegendata *cd1, classinfo *a)
 
void genarg_acr (codegendata *cd1, constant_classref *a)
 
void genarg_addr (codegendata *cd1, u1 *a)
 
void genarg_af (codegendata *cd1, functionptr a)
 
void genarg_afi (codegendata *cd1, fieldinfo *a)
 
void genarg_am (codegendata *cd1, methodinfo *a)
 
void genarg_acell (codegendata *cd1, Cell *a)
 
void genarg_ainst (codegendata *cd1, Inst *a)
 
void genarg_auf (codegendata *cd1, unresolved_field *a)
 
void genarg_aum (codegendata *cd1, unresolved_method *a)
 
void genarg_avftbl (codegendata *cd1, vftbl_t *a)
 
bool intrp_codegen (jitdata *jd)
 
u1intrp_createcompilerstub (methodinfo *m)
 
u1intrp_createnativestub (functionptr f, jitdata *jd, methoddesc *nmd)
 
Cellnativecall (functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1 *addrcif)
 
u1createcalljavafunction (methodinfo *m)
 

Variables

struct builtin_gen builtin_gen_table []
 

Macro Definition Documentation

#define COMPILERSTUB_CODESIZE   4

Definition at line 1827 of file codegen.c.

#define COMPILERSTUB_DATASIZE   2

Definition at line 1826 of file codegen.c.

#define COMPILERSTUB_SIZE   COMPILERSTUB_DATASIZE + COMPILERSTUB_CODESIZE

Definition at line 1829 of file codegen.c.

#define gen_branch (   _inst)
Value:
{ \
gen_##_inst(cd, 0); \
codegen_addreference(cd, BLOCK_OF(iptr->dst.insindex)); \
}

Definition at line 67 of file codegen.c.

#define I (   value)    iptr[0].sx.val.i = (value); break;

Definition at line 279 of file codegen.c.

#define index2offset (   _i)    (-(_i) * SIZEOF_VOID_P)

Definition at line 72 of file codegen.c.

Typedef Documentation

typedef struct builtin_gen builtin_gen

Definition at line 217 of file codegen.c.

typedef void(* genfunctionptr)(codegendata *)

Definition at line 215 of file codegen.c.

Function Documentation

u1* createcalljavafunction ( methodinfo m)

Definition at line 2196 of file codegen.c.

void genarg_aArray ( codegendata cd1,
java_arrayheader *  a 
)

Definition at line 117 of file codegen.c.

void genarg_aaTarget ( codegendata cd1,
Inst **  a 
)

Definition at line 124 of file codegen.c.

void genarg_acell ( codegendata cd1,
Cell a 
)

Definition at line 173 of file codegen.c.

void genarg_aClass ( codegendata cd1,
classinfo a 
)

Definition at line 131 of file codegen.c.

void genarg_acr ( codegendata cd1,
constant_classref a 
)

Definition at line 138 of file codegen.c.

void genarg_addr ( codegendata cd1,
u1 a 
)

Definition at line 145 of file codegen.c.

void genarg_af ( codegendata cd1,
functionptr  a 
)

Definition at line 152 of file codegen.c.

void genarg_afi ( codegendata cd1,
fieldinfo a 
)

Definition at line 159 of file codegen.c.

void genarg_ainst ( codegendata cd1,
Inst a 
)

Definition at line 180 of file codegen.c.

void genarg_am ( codegendata cd1,
methodinfo a 
)

Definition at line 166 of file codegen.c.

void genarg_aRef ( codegendata cd1,
java_objectheader *  a 
)

Definition at line 110 of file codegen.c.

void genarg_auf ( codegendata cd1,
unresolved_field a 
)

Definition at line 187 of file codegen.c.

void genarg_aum ( codegendata cd1,
unresolved_method a 
)

Definition at line 194 of file codegen.c.

void genarg_avftbl ( codegendata cd1,
vftbl_t a 
)

Definition at line 201 of file codegen.c.

void genarg_b ( codegendata cd1,
s4  i 
)

Definition at line 90 of file codegen.c.

void genarg_f ( codegendata cd1,
float  f 
)

Definition at line 95 of file codegen.c.

void genarg_i ( codegendata cd1,
s4  i 
)

Definition at line 83 of file codegen.c.

void genarg_l ( codegendata cd1,
s8  l 
)

Definition at line 103 of file codegen.c.

void genarg_v ( codegendata cd1,
Cell  v 
)

Definition at line 76 of file codegen.c.

bool intrp_codegen ( jitdata jd)

Definition at line 281 of file codegen.c.

u1* intrp_createcompilerstub ( methodinfo m)

Definition at line 1832 of file codegen.c.

u1* intrp_createnativestub ( functionptr  f,
jitdata jd,
methoddesc nmd 
)

Definition at line 1972 of file codegen.c.

Cell* nativecall ( functionptr  f,
methodinfo m,
Cell sp,
Inst ra,
Cell fp,
u1 addrcif 
)

Definition at line 2042 of file codegen.c.

Variable Documentation

struct builtin_gen builtin_gen_table[]

Definition at line 224 of file codegen.c.