80 N_AHI(REG_SP, -200); \
81 N_STM(R0, R15, 96, REG_SP); \
82 M_ALD_DSEG(R14, dseg_add_address(cd, &do__log)); \
83 N_LA(R2, 96, RN, REG_SP); \
85 N_LM(R0, R15, 96, REG_SP); \
180 if (varindex == UNUSED)
302 int32_t
s1,
s2,
s3, d, dd;
400 s1 = emit_load_s1_low(jd, iptr,
REG_ITMP1);
472 s2 = emit_load_s2_high(jd, iptr,
REG_ITMP3);
483 s2 = emit_load_s2_low(jd, iptr,
REG_ITMP3);
505 s1 = emit_load_s1_high(jd, iptr, dd);
506 s3 = iptr->
sx.
val.
l >> 32;
518 s1 = emit_load_s1_low(jd, iptr, dd);
519 s3 = iptr->
sx.
val.
l & 0xffffffff;
570 s2 = emit_load_s2_high(jd, iptr,
REG_ITMP3);
582 s2 = emit_load_s2_low(jd, iptr,
REG_ITMP3);
605 s1 = emit_load_s1_high(jd, iptr, dd);
606 s3 = iptr->
sx.
val.
l >> 32;
618 s1 = emit_load_s1_low(jd, iptr, dd);
619 s3 = iptr->
sx.
val.
l & 0xffffffff;
651 if (iptr->
sx.
val.
i == 2) {
702 bte = iptr->
sx.
s23.s3.bte;
775 assert(iptr->
sx.
val.
i <= 32);
785 s3 = (1 << iptr->
sx.
val.
i) - 1;
842 disp = iptr->
sx.
val.
i & 0x1F;
926 disp = iptr->
sx.
val.
i & 0x3F;
1009 switch (iptr->
opc) {
1034 s2 = emit_load_s2_low(jd, iptr,
REG_ITMP3);
1037 switch (iptr->
opc) {
1067 s2 = emit_load_s2_high(jd, iptr,
REG_ITMP3);
1070 switch (iptr->
opc) {
1114 s3 = iptr->
sx.
val.
l & 0xffffffff;
1120 switch (iptr->
opc) {
1135 s3 = iptr->
sx.
val.
l >> 32;
1141 switch (iptr->
opc) {
1285 #ifdef SUPPORT_HERCULES
1294 switch (iptr->
opc) {
1310 switch (iptr->
opc) {
1319 #ifdef SUPPORT_HERCULES
1326 switch (iptr->
opc) {
1347 #ifdef SUPPORT_HERCULES
1357 #ifdef SUPPORT_HERCULES
1362 #ifdef SUPPORT_HERCULES
1372 #ifdef SUPPORT_HERCULES
1399 switch (iptr->
opc) {
1644 s3 = emit_load_s3_high(jd, iptr,
REG_ITMP3);
1646 s3 = emit_load_s3_low(jd, iptr,
REG_ITMP3);
1715 uf = iptr->
sx.
s23.s3.uf;
1722 fi = iptr->
sx.
s23.s3.fmiref->p.field;
1723 fieldtype = fi->
type;
1727 switch (fieldtype) {
1768 uf = iptr->
sx.
s23.s3.uf;
1773 fi = iptr->
sx.
s23.s3.fmiref->p.field;
1774 fieldtype = fi->
type;
1806 switch (fieldtype) {
1808 M_IST(s2, s1, disp);
1815 M_AST(s2, s1, disp);
1818 M_FST(s2, s1, disp);
1821 M_DST(s2, s1, disp);
1848 # define LABEL_OUT BRANCH_LABEL_1
1850 s1 = emit_load_s1_high(jd, iptr,
REG_ITMP1);
1889 s1 = emit_load_s1_low(jd, iptr,
REG_ITMP1);
1943 switch (iptr->
opc) {
1966 s1 = emit_load_s1_high(jd, iptr,
REG_ITMP1);
1967 s2 = emit_load_s2_high(jd, iptr,
REG_ITMP2);
1999 s1 = emit_load_s1_low(jd, iptr,
REG_ITMP1);
2000 s2 = emit_load_s2_low(jd, iptr,
REG_ITMP2);
2027 if (out_ref != NULL) {
2041 l = iptr->
sx.
s23.s2.tablelow;
2042 i = iptr->
sx.
s23.s3.tablehigh;
2064 emit_bge(cd, table[0].
block);
2087 bte = iptr->
sx.
s23.s3.bte;
2088 if (bte->
stub == NULL) {
2106 if (bte->
stub == NULL) {
2119 um = iptr->
sx.
s23.s3.um;
2126 lm = iptr->
sx.
s23.s3.fmiref->p.method;
2145 um = iptr->
sx.
s23.s3.um;
2151 lm = iptr->
sx.
s23.s3.fmiref->p.method;
2173 um = iptr->
sx.
s23.s3.um;
2180 lm = iptr->
sx.
s23.s3.fmiref->p.method;
2221 # define LABEL_EXIT_CHECK_NULL BRANCH_LABEL_1
2222 # define LABEL_CLASS BRANCH_LABEL_2
2223 # define LABEL_EXIT_INTERFACE_NULL BRANCH_LABEL_3
2224 # define LABEL_EXIT_INTERFACE_DONE BRANCH_LABEL_4
2225 # define LABEL_EXIT_CLASS_NULL BRANCH_LABEL_5
2233 super = iptr->
sx.
s23.s3.c.cls;
2234 superindex = super->
index;
2235 supervftbl = super->
vftbl;
2242 if (super == NULL) {
2249 iptr->
sx.
s23.s3.c.ref,
2266 if (super == NULL) {
2268 PATCHER_checkcast_instanceof_interface,
2269 iptr->
sx.
s23.s3.c.ref,
2288 if (super == NULL) {
2295 if (super == NULL) {
2300 if (super == NULL) {
2305 iptr->
sx.
s23.s3.c.ref,
2353 if (super == NULL) {
2364 # undef LABEL_EXIT_CHECK_NULL
2366 # undef LABEL_EXIT_INTERFACE_NULL
2367 # undef LABEL_EXIT_INTERFACE_DONE
2368 # undef LABEL_EXIT_CLASS_NULL
2381 iptr->
sx.
s23.s3.c.ref,
2435 super = iptr->
sx.
s23.s3.c.cls;
2436 superindex = super->
index;
2437 supervftbl = super->
vftbl;
2440 # define LABEL_EXIT_CHECK_NULL BRANCH_LABEL_1
2441 # define LABEL_CLASS BRANCH_LABEL_2
2442 # define LABEL_EXIT_INTERFACE_NULL BRANCH_LABEL_3
2443 # define LABEL_EXIT_INTERFACE_INDEX_NOT_IN_TABLE BRANCH_LABEL_4
2444 # define LABEL_EXIT_INTERFACE_DONE BRANCH_LABEL_5
2445 # define LABEL_EXIT_CLASS_NULL BRANCH_LABEL_6
2456 if (super == NULL) {
2465 iptr->
sx.
s23.s3.c.ref, disp);
2482 if (super == NULL) {
2489 PATCHER_checkcast_instanceof_interface,
2490 iptr->
sx.
s23.s3.c.ref, 0);
2517 if (super == NULL) {
2524 if (super == NULL) {
2529 if (super == NULL) {
2533 iptr->
sx.
s23.s3.c.ref,
2560 if (super == NULL) {
2571 # undef LABEL_EXIT_CHECK_NULL
2573 # undef LABEL_EXIT_INTERFACE_NULL
2574 # undef LABEL_EXIT_INTERFACE_INDEX_NOT_IN_TABLE
2575 # undef LABEL_EXIT_INTERFACE_DONE
2576 # undef LABEL_EXIT_CLASS_NULL
2594 var =
VAR(iptr->
sx.
s23.s2.args[s1]);
2609 iptr->
sx.
s23.s3.c.ref,
2644 vm_abort(
"Unknown ICMD %d during code generation", iptr->
opc);
2727 #if defined(ENABLE_GC_CACAO)
2797 for (i = md->
paramcount - 1, j = i + skipparams; i >= 0; i--, j--) {
2912 #if defined(ENABLE_GC_CACAO)
void codegen_emit_instruction(jitdata *jd, instruction *iptr)
Generates machine code for one ICMD.
s4 dseg_add_double(codegendata *cd, double value)
#define BUILTIN_FAST_canstore
#define PATCHER_resolve_classref_to_flags
#define N_SLDL(r1, d2, b2)
#define N_BRC_BACK_PATCH(brc_pos)
s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg)
#define LABEL_EXIT_CHECK_NULL
s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg)
#define LABEL_EXIT_CLASS_NULL
#define N_CL(r1, d2, x2, b2)
#define M_ALD(a, b, disp)
#define PATCHER_invokeinterface
#define M_LST(a, b, disp)
s4 emit_load_s2_but(jitdata *jd, instruction *iptr, s4 tempreg, s4 notreg)
#define M_ILD(a, b, disp)
s4 dseg_add_unique_address(codegendata *cd, void *value)
#define PATCHER_resolve_classref_to_vftbl
#define BUILTIN_multianewarray
#define IS_INT_LNG_TYPE(a)
#define M_IST(a, b, disp)
#define M_LDA(a, b, disp)
#define PATCHER_get_putfield
#define M_AADD_IMM(a, b, c)
s4 dseg_add_address(codegendata *cd, void *value)
#define REG_ITMP12_PACKED
#define N_ST(r1, d2, x2, b2)
#define dseg_add_functionptr(cd, value)
#define N_C(r1, d2, x2, b2)
void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f, int skipparams)
typedef void(JNICALL *jvmtiEventSingleStep)(jvmtiEnv *jvmti_env
void emit_arraystore_check(codegendata *cd, instruction *iptr)
#define N_LE(r1, d2, x2, b2)
#define M_FST(a, b, disp)
patchref_t * patcher_add_patch_ref(jitdata *jd, functionptr patcher, void *ref, s4 disp)
#define M_FLD(a, b, disp)
void dseg_add_target(codegendata *cd, basicblock *target)
#define N_STH(r1, d2, x2, b2)
java_object_t * codegen_finish_native_call(u1 *sp, u1 *pv)
const s4 abi_registers_integer_saved[]
#define N_SRDA(r1, d2, b2)
#define REG_ITMP13_PACKED
#define BUILTIN_arraycheckcast
s4 dseg_add_s4(codegendata *cd, s4 value)
void vm_abort(const char *text,...)
void(* functionptr)(void)
java_handle_t * codegen_start_native_call(u1 *sp, u1 *pv)
#define IS_2_WORD_TYPE(a)
void emit_exception_check(codegendata *cd, instruction *iptr)
s4 codegen_reg_of_dst(jitdata *jd, instruction *iptr, s4 tempregnum)
#define N_SRL(r1, d2, b2)
#define N_N(r1, d2, x2, b2)
#define N_LD(r1, d2, x2, b2)
#define LABEL_EXIT_INTERFACE_DONE
#define M_ISUB_IMM(a, b, c)
#define N_SRA(r1, d2, b2)
constant_FMIref * fieldref
#define N_STE(r1, d2, x2, b2)
void emit_label_br(codegendata *cd, s4 label)
This file contains the statistics framework.
s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg)
#define REG_ITMP23_PACKED
#define N_SLL(r1, d2, b2)
#define M_ASUB_IMM(a, b, c)
#define M_SRL_IMM(a, b, c)
#define N_STC(r1, d2, x2, b2)
s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
#define REG_ITMP31_PACKED
s4 dseg_add_unique_s4(codegendata *cd, s4 value)
#define M_AST(a, b, disp)
union instruction::@12 sx
void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg)
void asm_handle_exception(void)
#define PACK_REGS(low, high)
#define M_SRDA_IMM(imm, reg)
void emit_store_dst(jitdata *jd, instruction *iptr, s4 d)
void emit_copy_dst(jitdata *jd, instruction *iptr, s4 dtmpreg)
#define N_STD(r1, d2, x2, b2)
#define PATCHER_invokestatic_special
#define LABEL_EXIT_INTERFACE_INDEX_NOT_IN_TABLE
#define N_L(r1, d2, x2, b2)
#define M_SRA_IMM(a, b, c)
#define PATCHER_invokevirtual
#define N_VALID_DSEG_DISP(x)
#define M_SLL_IMM(a, b, c)
#define M_IMUL_IMM(a, b, c)
#define N_SRDL(r1, d2, b2)
static bool IS_INMEMORY(s4 flags)
void codegen_emit_epilog(jitdata *jd)
Generates machine code for the method epilog.
#define N_LH(r1, d2, x2, b2)
#define M_ALD_DSEG(a, disp)
void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1)
void asm_handle_nat_exception(void)
#define M_FLD_DSEG(r, d, t)
#define N_IC(r1, d2, x2, b2)
#define M_DST(a, b, disp)
#define INSTRUCTION_IS_UNRESOLVED(iptr)
struct instruction::@12::@13 s23
void codegen_emit_prolog(jitdata *jd)
Generates machine code for the method prolog.
#define M_LLD(a, b, disp)
const parseddesc_t parseddesc
static void emit_fmove(codegendata *cd, int s, int d)
Generates a float-move from register s to d.
#define PATCHER_resolve_classref_to_classinfo
void emit_label(codegendata *cd, s4 label)
#define M_IADD_IMM(a, b, c)
#define N_MVC(d1, l, b1, d2, b2)
void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2)
#define M_DLD(a, b, disp)
#define M_DLD_DSEG(r, d, t)
s4 dseg_add_float(codegendata *cd, float value)
void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg)
static VM * get_current()
#define REG_RESULT_PACKED
#define LABEL_EXIT_INTERFACE_NULL