27 #ifndef EMIT_COMMON_HPP_
28 #define EMIT_COMMON_HPP_ 1
34 #include "codegen.hpp"
47 #define BRANCH_LABEL_1 1
48 #define BRANCH_LABEL_2 2
49 #define BRANCH_LABEL_3 3
50 #define BRANCH_LABEL_4 4
51 #define BRANCH_LABEL_5 5
52 #define BRANCH_LABEL_6 6
53 #define BRANCH_LABEL_7 7
54 #define BRANCH_LABEL_8 8
55 #define BRANCH_LABEL_9 9
56 #define BRANCH_LABEL_10 10
61 #if SIZEOF_VOID_P == 8
64 (((s8) (c) >= -128) && ((s8) (c) <= 127))
66 # define IS_IMM32(c) \
67 (((s8) (c) >= (-2147483647-1)) && ((s8) (c) <= 2147483647))
72 (((s4) (c) >= -128) && ((s4) (c) <= 127))
74 # define IS_IMM16(c) \
75 (((s4) (c) >= -32768) && ((s4) (c) <= 32767))
87 #if SIZEOF_VOID_P == 4
102 #if SIZEOF_VOID_P == 4
114 #if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
120 #if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
133 #if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
144 #if SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS
151 #if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
160 #if SUPPORT_BRANCH_CONDITIONAL_UNSIGNED_CONDITIONS
167 #if defined(__POWERPC__) || defined(__POWERPC64__)
178 #if SUPPORT_BRANCH_CONDITIONAL_ONE_INTEGER_REGISTER
179 void emit_label_beqz(
codegendata* cd,
int label,
int reg);
180 void emit_label_bnez(
codegendata* cd,
int label,
int reg);
181 void emit_label_bltz(
codegendata* cd,
int label,
int reg);
182 void emit_label_bgtz(
codegendata* cd,
int label,
int reg);
185 #if SUPPORT_BRANCH_CONDITIONAL_TWO_INTEGER_REGISTERS
190 #if SUPPORT_BRANCH_CONDITIONAL_CONDITION_REGISTER
225 #if defined(ENABLE_PROFILING)
259 #if SIZEOF_VOID_P == 8
298 #define M_INTMOVE(a, b) emit_imove(cd, a, b)
299 #define M_LNGMOVE(a, b) emit_lmove(cd, a, b)
300 #define M_FLTMOVE(a, b) emit_fmove(cd, a, b)
301 #define M_DBLMOVE(a, b) emit_dmove(cd, a, b)
304 #endif // EMIT_COMMON_HPP_
s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg)
s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg)
void emit_monitor_exit(jitdata *jd, int32_t syncslot_offset)
Generates synchronization code to leave a monitor.
void emit_monitor_enter(jitdata *jd, int32_t syncslot_offset)
Generates synchronization code to enter a monitor.
void emit_bcc(codegendata *cd, basicblock *target, s4 condition, u4 options)
void emit_store_low(jitdata *jd, instruction *iptr, varinfo *dst, s4 d)
static void emit_lmove(codegendata *cd, int s, int d)
Generates a long-move from register s to d.
void emit_label_bcc(codegendata *cd, s4 label, s4 condition, u4 options)
void emit_arraystore_check(codegendata *cd, instruction *iptr)
void emit_recompute_pv(codegendata *cd)
Emit code to recompute the procedure vector.
void emit_abstractmethoderror_trap(codegendata *cd)
void emit_fastpath_monitor_enter(jitdata *jd, instruction *iptr, int d)
Generates fast-path code for the below builtin.
void emit_verbosecall_enter(jitdata *jd)
void emit_exception_check(codegendata *cd, instruction *iptr)
void emit_store_high(jitdata *jd, instruction *iptr, varinfo *dst, s4 d)
void emit_lconst(codegendata *cd, s4 d, s8 value)
void emit_patcher_traps(jitdata *jd)
s4 emit_load_high(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
void emit_label_br(codegendata *cd, s4 label)
s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg)
void emit_trap_compiler(codegendata *cd)
void emit_trap(codegendata *cd, u1 Xd, int type)
s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
void emit_store(jitdata *jd, instruction *iptr, varinfo *dst, s4 d)
void emit_fastpath_monitor_exit(jitdata *jd, instruction *iptr, int d)
Generates fast-path code for the below builtin.
void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg)
void emit_icmp_imm(codegendata *cd, int reg, int32_t value)
Emits code comparing a single register.
void emit_store_dst(jitdata *jd, instruction *iptr, s4 d)
void emit_copy(jitdata *jd, instruction *iptr)
void emit_icmpeq_imm(codegendata *cd, int reg, int32_t value, int d)
Emits code comparing one integer register to an immediate value.
void emit_label_bccz(codegendata *cd, s4 label, s4 condition, s4 reg, u4 options)
s4 emit_load_low(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1)
void emit_branch(codegendata *cd, s4 disp, s4 condition, s4 reg, u4 opt)
void emit_iconst(codegendata *cd, s4 d, s4 value)
static void emit_fmove(codegendata *cd, int s, int d)
Generates a float-move from register s to d.
void emit_label(codegendata *cd, s4 label)
void emit_bccz(codegendata *cd, basicblock *target, s4 condition, s4 reg, u4 options)
void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2)
static void emit_dmove(codegendata *cd, int s, int d)
Generates an double-move from register s to d.
static void emit_imove(codegendata *cd, int s, int d)
Generates an integer-move from register s to d.
void emit_verbosecall_exit(jitdata *jd)
void emit_br(codegendata *cd, basicblock *target)
void emit_trap_countdown(codegendata *cd, s4 *counter)
void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg)