if (src->flags & INMEMORY) {
COUNT_SPILLS;
- disp = src->vv.regoff * 8;
+ disp = USESTACK + src->vv.regoff * 8;
if (IS_FLT_DBL_TYPE(src->type))
M_DLD(tempreg, REG_SP, disp);
if (dst->flags & INMEMORY) {
COUNT_SPILLS;
- disp = dst->vv.regoff * 8;
+ disp = USESTACK + dst->vv.regoff * 8;
if (IS_FLT_DBL_TYPE(dst->type))
M_DST(d, REG_SP, disp);
if (s1 != d) {
if (IS_FLT_DBL_TYPE(src->type))
- M_FMOV(s1, d);
+ M_DMOV(s1, d);
else
M_MOV(s1, d);
}
s4 disp;
if ((value >= -4096) && (value <= 4095)) {
- M_XOR(REG_ZERO, value, d);
+ M_XOR_IMM(REG_ZERO, value, d);
} else {
- disp = dseg_adds4(cd, value);
+ disp = dseg_add_s4(cd, value);
M_ILD(d, REG_PV_CALLEE, disp);
}
}
s4 disp;
if ((value >= -4096) && (value <= 4095)) {
- M_XOR(REG_ZERO, value, d);
+ M_XOR_IMM(REG_ZERO, value, d);
} else {
- disp = dseg_adds8(cd, value);
+ disp = dseg_add_s8(cd, value);
M_LDX(d, REG_PV_CALLEE, disp);
}
}
+/* emit_arrayindexoutofbounds_check ********************************************
+
+ Emit an ArrayIndexOutOfBoundsException check.
+
+*******************************************************************************/
+
+void emit_arrayindexoutofbounds_check(codegendata *cd, s4 s1, s4 s2)
+{
+}
+
+/* emit_nullpointer_check ******************************************************
+
+ Emit a NullPointerException check.
+
+*******************************************************************************/
+
+void emit_nullpointer_check(codegendata *cd, s4 reg)
+{
+}
/* emit_exception_stubs ********************************************************
#if defined(ENABLE_THREADS)
/* create a virtual java_objectheader */
- (void) dseg_addaddress(cd, NULL); /* flcword */
- (void) dseg_addaddress(cd, lock_get_initial_lock_word());
- disp = dseg_addaddress(cd, NULL); /* vftbl */
+ (void) dseg_add_unique_address(cd, NULL); /* flcword */
+ (void) dseg_add_unique_address(cd, lock_get_initial_lock_word());
+ disp = dseg_add_unique_address(cd, NULL); /* vftbl */
M_LDA(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, USESTACK + 4 * 8);
/* move machine code onto stack */
- disp = dseg_adds4(cd, mcode[0]);
+ disp = dseg_add_s4(cd, mcode[0]);
M_ILD(REG_ITMP3, REG_PV, disp);
M_IST(REG_ITMP3, REG_SP, USESTACK + 3 * 8);
- disp = dseg_adds4(cd, mcode[1]);
+ disp = dseg_add_s4(cd, mcode[1]);
M_ILD(REG_ITMP3, REG_PV, disp);
M_IST(REG_ITMP3, REG_SP, USESTACK + 3 * 8 + 4);
/* move class/method/field reference onto stack */
- disp = dseg_addaddress(cd, pref->ref);
+ disp = dseg_add_address(cd, pref->ref);
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, USESTACK + 2 * 8);
/* move data segment displacement onto stack */
- disp = dseg_adds4(cd, pref->disp);
+ disp = dseg_add_s4(cd, pref->disp);
M_ILD(REG_ITMP3, REG_PV, disp);
M_IST(REG_ITMP3, REG_SP, USESTACK + 1 * 8);
/* move patcher function pointer onto stack */
- disp = dseg_addaddress(cd, pref->patcher);
+ disp = dseg_add_address(cd, pref->patcher);
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, USESTACK + 0 * 8);
*******************************************************************************/
+#if defined(ENABLE_REPLACEMENT)
void emit_replacement_stubs(jitdata *jd)
{
}
+#endif /* defined(ENABLE_REPLACEMENT) */
/* emit_verbosecall_enter ******************************************************
M_LDX(rd->argintregs[i], REG_SP, USESTACK_PARAMS);
}
else {
- M_DST(rd->argfltregs[i], REG_SP, USESTACK_PARAMS);
- M_LDX(rd->argintregs[i], REG_SP, USESTACK_PARAMS);
+ M_FST(rd->argfltregs[i], REG_SP, USESTACK_PARAMS);
+ M_ILD(rd->argintregs[i], REG_SP, USESTACK_PARAMS);
}
}
}
M_ALD(rd->argintregs[0], REG_PV_CALLEE, disp);
M_MOV(REG_RESULT_CALLEE, rd->argintregs[1]);
- M_DMOV(REG_FRESULT, rd->argfltregs[2]);
- M_FMOV(REG_FRESULT, rd->argfltregs[3]);
+ M_DMOV(REG_FRESULT, 2); /* applies for flt and dbl values */
disp = dseg_add_functionptr(cd, builtin_displaymethodstop);
M_ALD(REG_ITMP3, REG_PV_CALLEE, disp);