201 if ((((intptr_t) cd->
mcodeptr) & 3) >= 2)
217 memmove(mcodeptr_save + disp, mcodeptr_save, cd->
mcodeptr - mcodeptr_save);
241 u1* mcodeptr_save = NULL;
491 if (iptr->
sx.
val.
i == 2) {
1131 disp = ((s1 ==
REG_FTMP1) ? 0 : 5) + 10 + 3 +
1147 disp = ((s1 ==
REG_FTMP1) ? 0 : 5) + 10 + 3 +
1164 disp = ((s1 ==
REG_FTMP1) ? 0 : 5) + 10 + 3 +
1181 disp = ((s1 ==
REG_FTMP1) ? 0 : 5) + 10 + 3 +
1520 uf = iptr->
sx.
s23.s3.uf;
1533 fi = iptr->
sx.
s23.s3.fmiref->p.field;
1534 fieldtype = fi->
type;
1554 switch (fieldtype) {
1581 uf = iptr->
sx.
s23.s3.uf;
1595 fi = iptr->
sx.
s23.s3.fmiref->p.field;
1596 fieldtype = fi->
type;
1603 switch (fieldtype) {
1636 uf = iptr->
sx.
s23.s3.uf;
1650 fi = iptr->
sx.
s23.s3.fmiref->p.field;
1651 fieldtype = fi->
type;
1658 switch (fieldtype) {
1685 uf = iptr->
sx.
s23.s3.uf;
1699 fi = iptr->
sx.
s23.s3.fmiref->p.field;
1700 fieldtype = fi->
type;
1707 switch (fieldtype) {
1775 l = iptr->
sx.
s23.s2.tablelow;
1776 i = iptr->
sx.
s23.s3.tablehigh;
1790 emit_bugt(cd, table[0].
block);
1812 bte = iptr->
sx.
s23.s3.bte;
1813 if (bte->
stub == NULL) {
1828 um = iptr->
sx.
s23.s3.um;
1835 lm = iptr->
sx.
s23.s3.fmiref->p.method;
1845 um = iptr->
sx.
s23.s3.um;
1852 lm = iptr->
sx.
s23.s3.fmiref->p.method;
1865 um = iptr->
sx.
s23.s3.um;
1873 lm = iptr->
sx.
s23.s3.fmiref->p.method;
1902 super = iptr->
sx.
s23.s3.c.cls;
1903 superindex = super->
index;
1910 if (super == NULL) {
1915 iptr->
sx.
s23.s3.c.ref, 0);
1927 if (super != NULL) {
1934 if (super == NULL) {
1936 iptr->
sx.
s23.s3.c.ref,
1963 if (super == NULL) {
1983 if (super == NULL || super->
vftbl->subtype_depth >= DISPLAY_SIZE) {
1988 if (super == NULL) {
2023 if (super == NULL) {
2075 super = iptr->
sx.
s23.s3.c.cls;
2076 superindex = super->
index;
2091 if (super == NULL) {
2096 iptr->
sx.
s23.s3.c.ref, 0);
2109 if (super != NULL) {
2116 if (super == NULL) {
2118 iptr->
sx.
s23.s3.c.ref, 0);
2128 int a = 3 + 4 + 3 + 4 + nops;
2147 if (super == NULL) {
2167 if (super == NULL || super->
vftbl->subtype_depth >= DISPLAY_SIZE) {
2179 if (super == NULL) {
2218 if (super == NULL) {
2236 var =
VAR(iptr->
sx.
s23.s2.args[s1]);
2283 vm_abort(
"Unknown ICMD %d during code generation", iptr->
opc);
2337 #if defined(ENABLE_PROFILING)
2352 #if defined(ENABLE_GC_CACAO)
2423 for (i = md->
paramcount - 1, j = i + skipparams; i >= 0; i--, j--) {
2549 #if defined(ENABLE_GC_CACAO)
void codegen_emit_instruction(jitdata *jd, instruction *iptr)
Generates machine code for one ICMD.
void emit_ucomisd_reg_reg(codegendata *cd, s8 reg, s8 dreg)
s4 dseg_add_double(codegendata *cd, double value)
#define BUILTIN_FAST_canstore
#define M_LLD32(a, b, disp)
#define PATCHER_resolve_classref_to_flags
s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg)
#define M_LST32(a, b, disp)
#define M_LMUL_IMM(a, b, c)
s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg)
void emit_mov_reg_memindex(codegendata *cd, s4 reg, s4 disp, s4 basereg, s4 indexreg, s4 scale)
#define M_ALD(a, b, disp)
s4 asm_builtin_f2i(float a)
#define PATCHER_invokeinterface
#define M_ILD32(a, b, disp)
#define M_LST(a, b, disp)
#define M_ALD32(a, b, disp)
void emit_movw_reg_memindex(codegendata *cd, s4 reg, s4 disp, s4 basereg, s4 indexreg, s4 scale)
s8 asm_builtin_d2l(double a)
void emit_ucomiss_reg_reg(codegendata *cd, s8 reg, s8 dreg)
#define M_ILD(a, b, disp)
s4 dseg_add_unique_address(codegendata *cd, void *value)
void emit_ishift(jitdata *jd, s4 shift_op, instruction *iptr)
#define PATCHER_resolve_classref_to_vftbl
#define BUILTIN_multianewarray
#define IS_INT_LNG_TYPE(a)
static void codegen_fixup_alignment(codegendata *cd, patchref_t *pr, u1 *mcodeptr_save)
Ensures that the patched location (an int32_t) is aligned.
void emit_alul_imm_reg(codegendata *cd, s8 opc, s8 imm, s8 dreg)
#define PATCHER_get_putfield
#define M_AADD_IMM(a, b, c)
#define M_LSLL_IMM(a, b, c)
s4 dseg_add_address(codegendata *cd, void *value)
void emit_bcc(codegendata *cd, basicblock *target, s4 condition, u4 options)
void emit_mov_imm_memindex(codegendata *cd, s4 imm, s4 disp, s4 basereg, s4 indexreg, s4 scale)
void emit_movb_imm_memindex(codegendata *cd, s4 imm, s4 disp, s4 basereg, s4 indexreg, s4 scale)
void emit_alu_reg_reg(codegendata *cd, s4 opc, s4 reg, s4 dreg)
#define dseg_add_functionptr(cd, value)
#define JITDATA_HAS_FLAG_INSTRUMENT(jd)
void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f, int skipparams)
s4 asm_builtin_d2i(double a)
typedef void(JNICALL *jvmtiEventSingleStep)(jvmtiEnv *jvmti_env
void emit_alul_reg_reg(codegendata *cd, s8 opc, s8 reg, s8 dreg)
void emit_arraystore_check(codegendata *cd, instruction *iptr)
#define M_IST32_IMM(a, b, disp)
#define M_FST(a, b, disp)
patchref_t * patcher_add_patch_ref(jitdata *jd, functionptr patcher, void *ref, s4 disp)
void emit_arbitrary_nop(codegendata *cd, int disp)
#define M_FLD(a, b, disp)
void dseg_add_target(codegendata *cd, basicblock *target)
void emit_xorps_reg_reg(codegendata *cd, s8 reg, s8 dreg)
void emit_idivl_reg(codegendata *cd, s8 reg)
java_object_t * codegen_finish_native_call(u1 *sp, u1 *pv)
const s4 abi_registers_integer_saved[]
#define PATCHER_get_putstatic
#define BUILTIN_arraycheckcast
void emit_movl_reg_memindex(codegendata *cd, s8 reg, s8 disp, s8 basereg, s8 indexreg, s8 scale)
void emit_movsd_memindex_reg(codegendata *cd, s8 disp, s8 basereg, s8 indexreg, s8 scale, s8 dreg)
void emit_cmovccl_reg_reg(codegendata *cd, s4 opc, s4 reg, s4 dreg)
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 PATCHER_instanceof_interface
#define M_LST_IMM32(a, b, disp)
#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 M_ICMP_IMM32(a, b)
#define M_ISRA_IMM(a, b, c)
#define M_LCMP_MEMINDEX(a, b, c, d, e)
void emit_movsd_reg_memindex(codegendata *cd, s8 reg, s8 disp, s8 basereg, s8 indexreg, s8 scale)
void emit_movb_reg_memindex(codegendata *cd, s4 reg, s4 disp, s4 basereg, s4 indexreg, s4 scale)
#define M_FST32(a, b, disp)
#define M_ISUB_IMM(a, b, c)
#define M_IINC_MEMBASE(a, b)
#define M_LSRA_IMM(a, b, c)
s8 asm_builtin_f2l(float a)
void emit_movss_reg_memindex(codegendata *cd, s8 reg, s8 disp, s8 basereg, s8 indexreg, s8 scale)
constant_FMIref * fieldref
void emit_label_br(codegendata *cd, s4 label)
This file contains the statistics framework.
void emit_cqto(codegendata *cd)
s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg)
#define M_LSRL_IMM(a, b, c)
#define M_ASUB_IMM(a, b, c)
#define M_DST32(a, b, disp)
void emit_xorpd_reg_reg(codegendata *cd, s8 reg, s8 dreg)
void emit_movsbq_memindex_reg(codegendata *cd, s8 disp, s8 basereg, s8 indexreg, s8 scale, s8 reg)
s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
#define M_IST_IMM(a, b, disp)
s4 dseg_add_unique_s4(codegendata *cd, s4 value)
#define M_AST(a, b, disp)
void emit_cltd(codegendata *cd)
union instruction::@12 sx
void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg)
void emit_mov_memindex_reg(codegendata *cd, s4 disp, s4 basereg, s4 indexreg, s4 scale, s4 reg)
#define M_FLD32(a, b, disp)
#define PATCHER_checkcast_interface
#define M_LCMP_MEMBASE(a, b, c)
void emit_movl_memindex_reg(codegendata *cd, s8 disp, s8 basereg, s8 indexreg, s8 scale, s8 reg)
void emit_mov_reg_reg(codegendata *cd, s4 reg, s4 dreg)
#define M_LSUB_IMM(a, b, c)
#define M_ICMP_MEMBASE(a, b, c)
void emit_store_dst(jitdata *jd, instruction *iptr, s4 d)
#define M_LADD_IMM(a, b, c)
void emit_alu_imm_reg(codegendata *cd, s4 opc, s4 imm, s4 dreg)
#define M_IST32(a, b, disp)
#define PATCHER_invokestatic_special
void emit_movss_memindex_reg(codegendata *cd, s8 disp, s8 basereg, s8 indexreg, s8 scale, s8 dreg)
void emit_movd_membase_reg(codegendata *cd, s8 basereg, s8 disp, s8 dreg)
void emit_leal_membase_reg(codegendata *cd, s8 basereg, s8 disp, s8 reg)
#define PATCHER_invokevirtual
#define M_IMUL_IMM(a, b, c)
void emit_nop(codegendata *cd)
static bool IS_INMEMORY(s4 flags)
#define M_ISRL_IMM(a, b, c)
void codegen_emit_epilog(jitdata *jd)
Generates machine code for the method epilog.
void emit_movw_imm_memindex(codegendata *cd, s4 imm, s4 disp, s4 basereg, s4 indexreg, s4 scale)
void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1)
#define M_ISLL_IMM(a, b, c)
s4 dseg_add_s8(codegendata *cd, s8 value)
static bool class_is_or_almost_initialized(classinfo *c)
void emit_cmovcc_reg_reg(codegendata *cd, s4 opc, s4 reg, s4 dreg)
#define PATCHER_initialize_class
#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.
void emit_shift_imm_reg(codegendata *cd, s4 opc, s4 imm, s4 dreg)
void emit_movzwq_memindex_reg(codegendata *cd, s8 disp, s8 basereg, s8 indexreg, s8 scale, s8 reg)
#define M_IAND_IMM(a, b, d)
#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 M_IOR_IMM(a, b, d)
#define PATCHER_resolve_classref_to_classinfo
void emit_label(codegendata *cd, s4 label)
#define M_DLD32(a, b, disp)
#define M_IADD_IMM(a, b, c)
#define M_ALD_MEM(a, disp)
void emit_shiftl_imm_reg(codegendata *cd, s8 opc, s8 imm, s8 dreg)
PrimitiveType primitivetype
void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2)
void emit_lshift(jitdata *jd, s4 shift_op, instruction *iptr)
#define M_DLD(a, b, disp)
void emit_idiv_reg(codegendata *cd, s4 reg)
void emit_movl_imm_memindex(codegendata *cd, s4 imm, s4 disp, s4 basereg, s4 indexreg, s4 scale)
s4 dseg_add_float(codegendata *cd, float value)
void emit_movss_membase_reg(codegendata *cd, s8 basereg, s8 disp, s8 dreg)
void emit_lea_membase_reg(codegendata *cd, s8 basereg, s8 disp, s8 reg)
void codegen_emit_patchable_barrier(instruction *iptr, codegendata *cd, patchref_t *pr, fieldinfo *fi)
Generates a memory barrier to be used after volatile writes.
#define PATCH_ALIGNMENT(addr, offset, size)
void emit_movdl_membase_reg(codegendata *cd, s8 basereg, s8 disp, s8 dreg)
void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg)
void emit_movswq_memindex_reg(codegendata *cd, s8 disp, s8 basereg, s8 indexreg, s8 scale, s8 reg)
static VM * get_current()