(void) dseg_add_unique_s4(cd, 0); /* IntSave */
(void) dseg_add_unique_s4(cd, 0); /* FltSave */
- /* print call trace */
-#if 0
-#if !defined(NDEBUG)
- if (JITDATA_HAS_FLAG_VERBOSECALL(jd)) {
- emit_verbosecall_enter(jd);
- }
-#endif
-#endif
-
/* generate code */
M_AADD_IMM(-(cd->stackframesize*8), REG_SP);
- /* get function address (this must happen before the stackframeinfo) */
- if (f == NULL) {
- patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, 0);
- }
-
- M_AMOV_IMM(f, REG_ATMP2); /* do not move this line, the patcher is needed */
-
- M_AST(REG_ATMP2, REG_SP, 4 * 4);
-
/* put arguments for codegen_start_native_call onto stack */
/* void codegen_start_native_call(u1 *datasp, u1 *pv, u1 *sp, u1 *ra) */
if (m->flags & ACC_STATIC)
M_INT2ADRMOVE(REG_RESULT, REG_ATMP3);
- /* load function pointer */
- M_ALD(REG_ATMP2, REG_SP, 4 * 4);
-
/* copy arguments into stackframe */
for (i = md->paramcount -1, j = i + skipparams; i >= 0; --i, --j) {
t = md->paramtypes[i].type;
}
/* call the native function */
+ M_AMOV_IMM(f, REG_ATMP2);
M_JSR(REG_ATMP2);
/* save return value */
default: assert(0);
}
-#if 0
- /* print call trace */
-#if ! defined(NDEBUG)
- if (JITDATA_HAS_FLAG_VERBOSECALL(jd)) {
- emit_verbosecall_exit(jd);
- }
-#endif
-#endif
+
/* remove native stackframe info */
/* therefore we call: java_objectheader *codegen_finish_native_call(u1 *datasp) */
/* should never be reached from within jit code*/
M_JSR_IMM(0);
-
- /* generate patcher stub call code */
- emit_patcher_traps(jd);
}