CACAO
Data Structures | Macros | Typedefs | Functions
jit.hpp File Reference

Go to the source code of this file.

Data Structures

struct  interface_info
 
struct  jitdata
 
struct  exception_entry
 
struct  basicblock
 

Macros

#define COUNT(x)   /* nothing */
 
#define COUNT_SPILLS   /* nothing */
 
#define COUNT_READ_SPILLS(x)   /* nothing */
 
#define COUNT_WRITE_SPILLS(x)   /* nothing */
 
#define FOR_EACH_BASICBLOCK(jd, it)   for ((it) = (jd)->basicblocks; (it) != NULL; (it) = (it)->next)
 
#define JITDATA_FLAG_PARSE   0x00000001
 
#define JITDATA_FLAG_VERIFY   0x00000002
 
#define JITDATA_FLAG_INSTRUMENT   0x00000004
 
#define JITDATA_FLAG_IFCONV   0x00000008
 
#define JITDATA_FLAG_REORDER   0x00000010
 
#define JITDATA_FLAG_INLINE   0x00000020
 
#define JITDATA_FLAG_COUNTDOWN   0x00000100
 
#define JITDATA_FLAG_SHOWINTERMEDIATE   0x20000000
 
#define JITDATA_FLAG_SHOWDISASSEMBLE   0x40000000
 
#define JITDATA_FLAG_VERBOSECALL   0x80000000
 
#define JITDATA_HAS_FLAG_PARSE(jd)   ((jd)->flags & JITDATA_FLAG_PARSE)
 
#define JITDATA_HAS_FLAG_VERIFY(jd)   ((jd)->flags & JITDATA_FLAG_VERIFY)
 
#define JITDATA_HAS_FLAG_INSTRUMENT(jd)   ((jd)->flags & JITDATA_FLAG_INSTRUMENT)
 
#define JITDATA_HAS_FLAG_IFCONV(jd)   ((jd)->flags & JITDATA_FLAG_IFCONV)
 
#define JITDATA_HAS_FLAG_REORDER(jd)   ((jd)->flags & JITDATA_FLAG_REORDER)
 
#define JITDATA_HAS_FLAG_INLINE(jd)   ((jd)->flags & JITDATA_FLAG_INLINE)
 
#define JITDATA_HAS_FLAG_COUNTDOWN(jd)   ((jd)->flags & JITDATA_FLAG_COUNTDOWN)
 
#define JITDATA_HAS_FLAG_SHOWINTERMEDIATE(jd)   ((jd)->flags & JITDATA_FLAG_SHOWINTERMEDIATE)
 
#define JITDATA_HAS_FLAG_SHOWDISASSEMBLE(jd)   ((jd)->flags & JITDATA_FLAG_SHOWDISASSEMBLE)
 
#define JITDATA_HAS_FLAG_VERBOSECALL(jd)   ((jd)->flags & JITDATA_FLAG_VERBOSECALL)
 
#define VAROP(v)   (jd->var + (v).varindex)
 
#define VAR(i)   (jd->var + (i))
 
#define BBFLAG_REPLACEMENT   0x01 /* put a replacement point at the start */
 
#define FOR_EACH_SUCCESSOR(bptr, it)   for ((it) = (bptr)->successors; (it) != (bptr)->successors + (bptr)->successorcount; ++(it))
 
#define FOR_EACH_PREDECESSOR(bptr, it)
 
#define FOR_EACH_INSTRUCTION(bptr, it)   for ((it) = (bptr)->iinstr; (it) != (bptr)->iinstr + (bptr)->icount; ++(it))
 
#define FOR_EACH_INSTRUCTION_REV(bptr, it)   for ((it) = (bptr)->iinstr + (bptr)->icount - 1; (it) != (bptr)->iinstr - 1; --(it))
 
#define JAVALOCAL_FROM_RETADDR(nr)   (jitdata::UNUSED - (1 + (nr)))
 
#define RETADDR_FROM_JAVALOCAL(jl)   (jitdata::UNUSED - (1 + (jl)))
 
#define BASICBLOCK_INIT(bptr, m)
 
#define REG_RES   0 /* reserved register for OS or code generator */
 
#define REG_RET   1 /* return value register */
 
#define REG_EXC   2 /* exception value register */
 
#define REG_SAV   3 /* (callee) saved register */
 
#define REG_TMP   4 /* scratch temporary register (caller saved) */
 
#define REG_ARG   5 /* argument register (caller saved) */
 
#define REG_END   -1 /* last entry in tables */
 
#define PARAMMODE_NUMBERED   0
 
#define PARAMMODE_STUFFED   1
 

Typedefs

typedef struct interface_info interface_info
 

Functions

static bool var_is_local (const jitdata *jd, s4 i)
 
static bool var_is_prealloc (const jitdata *jd, s4 i)
 
static bool var_is_inout (const jitdata *jd, s4 i)
 
static bool var_is_temp (const jitdata *jd, s4 i)
 
static bool var_is_saved (const jitdata *jd, s4 i)
 
static bool basicblock_reached (const basicblock *bptr)
 
void jit_init (void)
 
void jit_close (void)
 
jitdatajit_jitdata_new (methodinfo *m)
 
u1jit_compile (methodinfo *m)
 
u1jit_recompile (methodinfo *m)
 
void jit_invalidate_code (methodinfo *m)
 
codeinfojit_get_current_code (methodinfo *m)
 
void jit_request_optimization (methodinfo *m)
 
voidjit_asm_compile (methodinfo *m, void *mptr, void *sp, void *ra)
 
voidjit_compile_handle (methodinfo *m, void *pv, void *ra, void *mptr)
 
ICMD jit_complement_condition (ICMD opcode)
 
void jit_renumber_basicblocks (jitdata *jd)
 
void jit_check_basicblock_numbers (jitdata *jd)
 
void md_init (void)
 
voidmd_jit_method_patch_address (void *pv, void *ra, void *mptr)
 

Macro Definition Documentation

#define BASICBLOCK_INIT (   bptr,
 
)
Value:
do { \
bptr->mpc = -1; \
bptr->state = basicblock::UNDEF; \
bptr->type = basicblock::TYPE_STD; \
bptr->method = (m); \
} while (0)

Definition at line 423 of file jit.hpp.

#define BBFLAG_REPLACEMENT   0x01 /* put a replacement point at the start */

Definition at line 285 of file jit.hpp.

#define COUNT (   x)    /* nothing */

Definition at line 107 of file jit.hpp.

#define COUNT_READ_SPILLS (   x)    /* nothing */

Definition at line 109 of file jit.hpp.

#define COUNT_SPILLS   /* nothing */

Definition at line 108 of file jit.hpp.

#define COUNT_WRITE_SPILLS (   x)    /* nothing */

Definition at line 110 of file jit.hpp.

#define FOR_EACH_BASICBLOCK (   jd,
  it 
)    for ((it) = (jd)->basicblocks; (it) != NULL; (it) = (it)->next)

Definition at line 181 of file jit.hpp.

#define FOR_EACH_INSTRUCTION (   bptr,
  it 
)    for ((it) = (bptr)->iinstr; (it) != (bptr)->iinstr + (bptr)->icount; ++(it))

Definition at line 384 of file jit.hpp.

#define FOR_EACH_INSTRUCTION_REV (   bptr,
  it 
)    for ((it) = (bptr)->iinstr + (bptr)->icount - 1; (it) != (bptr)->iinstr - 1; --(it))

Definition at line 387 of file jit.hpp.

#define FOR_EACH_PREDECESSOR (   bptr,
  it 
)
Value:
for ( \
(it) = (bptr)->predecessors; \
(it) != (bptr)->predecessors + ((bptr)->predecessorcount < 0 ? 0 : (bptr)->predecessorcount); \
++(it) \
)

Definition at line 377 of file jit.hpp.

#define FOR_EACH_SUCCESSOR (   bptr,
  it 
)    for ((it) = (bptr)->successors; (it) != (bptr)->successors + (bptr)->successorcount; ++(it))

Definition at line 374 of file jit.hpp.

#define JAVALOCAL_FROM_RETADDR (   nr)    (jitdata::UNUSED - (1 + (nr)))

Definition at line 416 of file jit.hpp.

#define JITDATA_FLAG_COUNTDOWN   0x00000100

Definition at line 193 of file jit.hpp.

#define JITDATA_FLAG_IFCONV   0x00000008

Definition at line 189 of file jit.hpp.

#define JITDATA_FLAG_INLINE   0x00000020

Definition at line 191 of file jit.hpp.

#define JITDATA_FLAG_INSTRUMENT   0x00000004

Definition at line 187 of file jit.hpp.

#define JITDATA_FLAG_PARSE   0x00000001

Definition at line 184 of file jit.hpp.

#define JITDATA_FLAG_REORDER   0x00000010

Definition at line 190 of file jit.hpp.

#define JITDATA_FLAG_SHOWDISASSEMBLE   0x40000000

Definition at line 196 of file jit.hpp.

#define JITDATA_FLAG_SHOWINTERMEDIATE   0x20000000

Definition at line 195 of file jit.hpp.

#define JITDATA_FLAG_VERBOSECALL   0x80000000

Definition at line 197 of file jit.hpp.

#define JITDATA_FLAG_VERIFY   0x00000002

Definition at line 185 of file jit.hpp.

#define JITDATA_HAS_FLAG_COUNTDOWN (   jd)    ((jd)->flags & JITDATA_FLAG_COUNTDOWN)

Definition at line 218 of file jit.hpp.

#define JITDATA_HAS_FLAG_IFCONV (   jd)    ((jd)->flags & JITDATA_FLAG_IFCONV)

Definition at line 209 of file jit.hpp.

#define JITDATA_HAS_FLAG_INLINE (   jd)    ((jd)->flags & JITDATA_FLAG_INLINE)

Definition at line 215 of file jit.hpp.

#define JITDATA_HAS_FLAG_INSTRUMENT (   jd)    ((jd)->flags & JITDATA_FLAG_INSTRUMENT)

Definition at line 206 of file jit.hpp.

#define JITDATA_HAS_FLAG_PARSE (   jd)    ((jd)->flags & JITDATA_FLAG_PARSE)

Definition at line 200 of file jit.hpp.

#define JITDATA_HAS_FLAG_REORDER (   jd)    ((jd)->flags & JITDATA_FLAG_REORDER)

Definition at line 212 of file jit.hpp.

#define JITDATA_HAS_FLAG_SHOWDISASSEMBLE (   jd)    ((jd)->flags & JITDATA_FLAG_SHOWDISASSEMBLE)

Definition at line 224 of file jit.hpp.

#define JITDATA_HAS_FLAG_SHOWINTERMEDIATE (   jd)    ((jd)->flags & JITDATA_FLAG_SHOWINTERMEDIATE)

Definition at line 221 of file jit.hpp.

#define JITDATA_HAS_FLAG_VERBOSECALL (   jd)    ((jd)->flags & JITDATA_FLAG_VERBOSECALL)

Definition at line 227 of file jit.hpp.

#define JITDATA_HAS_FLAG_VERIFY (   jd)    ((jd)->flags & JITDATA_FLAG_VERIFY)

Definition at line 203 of file jit.hpp.

#define PARAMMODE_NUMBERED   0

Definition at line 448 of file jit.hpp.

#define PARAMMODE_STUFFED   1

Definition at line 449 of file jit.hpp.

#define REG_ARG   5 /* argument register (caller saved) */

Definition at line 444 of file jit.hpp.

#define REG_END   -1 /* last entry in tables */

Definition at line 446 of file jit.hpp.

#define REG_EXC   2 /* exception value register */

Definition at line 441 of file jit.hpp.

#define REG_RES   0 /* reserved register for OS or code generator */

Definition at line 439 of file jit.hpp.

#define REG_RET   1 /* return value register */

Definition at line 440 of file jit.hpp.

#define REG_SAV   3 /* (callee) saved register */

Definition at line 442 of file jit.hpp.

#define REG_TMP   4 /* scratch temporary register (caller saved) */

Definition at line 443 of file jit.hpp.

#define RETADDR_FROM_JAVALOCAL (   jl)    (jitdata::UNUSED - (1 + (jl)))

Definition at line 417 of file jit.hpp.

#define VAR (   i)    (jd->var + (i))

Definition at line 252 of file jit.hpp.

#define VAROP (   v)    (jd->var + (v).varindex)

Definition at line 251 of file jit.hpp.

Typedef Documentation

Definition at line 113 of file jit.hpp.

Function Documentation

static bool basicblock_reached ( const basicblock bptr)
inlinestatic

Definition at line 431 of file jit.hpp.

void* jit_asm_compile ( methodinfo m,
void mptr,
void sp,
void ra 
)

Definition at line 1008 of file jit.cpp.

void jit_check_basicblock_numbers ( jitdata jd)

Definition at line 1177 of file jit.cpp.

void jit_close ( void  )

Definition at line 197 of file jit.cpp.

u1* jit_compile ( methodinfo m)

Definition at line 274 of file jit.cpp.

void* jit_compile_handle ( methodinfo m,
void pv,
void ra,
void mptr 
)

Definition at line 1064 of file jit.cpp.

ICMD jit_complement_condition ( ICMD  opcode)

Definition at line 1117 of file jit.cpp.

codeinfo* jit_get_current_code ( methodinfo m)

Definition at line 968 of file jit.cpp.

void jit_init ( void  )

Definition at line 151 of file jit.cpp.

void jit_invalidate_code ( methodinfo m)

Definition at line 910 of file jit.cpp.

jitdata* jit_jitdata_new ( methodinfo m)

Definition at line 217 of file jit.cpp.

u1* jit_recompile ( methodinfo m)

Definition at line 453 of file jit.cpp.

void jit_renumber_basicblocks ( jitdata jd)

Definition at line 1146 of file jit.cpp.

void jit_request_optimization ( methodinfo m)

Definition at line 943 of file jit.cpp.

void md_init ( void  )

Definition at line 48 of file md.cpp.

void* md_jit_method_patch_address ( void pv,
void ra,
void mptr 
)

Definition at line 83 of file md.cpp.

static bool var_is_inout ( const jitdata jd,
s4  i 
)
inlinestatic

Definition at line 262 of file jit.hpp.

static bool var_is_local ( const jitdata jd,
s4  i 
)
inlinestatic

Definition at line 254 of file jit.hpp.

static bool var_is_prealloc ( const jitdata jd,
s4  i 
)
inlinestatic

Definition at line 258 of file jit.hpp.

static bool var_is_saved ( const jitdata jd,
s4  i 
)
inlinestatic

Definition at line 278 of file jit.hpp.

static bool var_is_temp ( const jitdata jd,
s4  i 
)
inlinestatic

Definition at line 273 of file jit.hpp.