movel %sp@(12*4+2*4),%a2 /* arg array */
movel %sp@(12*4+3*4),%d2 /* arg count */
- movel %a3, %sp@(12*4) /* copy method address to stackslot */
- leal %sp@(12*4), %a3 /* and store that address in %a3 */
+ movel %a3, %sp@(11*4) /* copy method address to stackslot */
+ leal %sp@(11*4), %a3 /* and store that address in %a3 */
#else
addal #(-12*4-6*8), %sp
moveml %d2/%d3/%d4/%d5/%d6/%d7/%a2/%a3/%a4/%a5/%fp,%sp@ /* save registers */
movel %sp@(12*4+6*8+2*4),%a2 /* arg array */
movel %sp@(12*4+6*8+3*4),%d2 /* arg count */
- movel %a3, %sp@(12*4+6*8) /* copy method address to stackslot */
- leal %sp@(12*4+6*8), %a3 /* and store that address in %a3 */
+ movel %a3, %sp@(11*4+6*8) /* copy method address to stackslot */
+ leal %sp@(11*4+6*8), %a3 /* and store that address in %a3 */
#endif
moveal %sp, %a5 /* memorize stack */
(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 */
}
}
- /* for static function class as second arg */
- if (m->flags & ACC_STATIC)
- M_AST(REG_ATMP3, REG_SP, 1 * 4);
+ /* builtins are not invoked like natives, environemtn and clazz are only needed for natives */
+ if (m->flags & ACC_NATIVE) {
+ /* for static function class as second arg */
+ if (m->flags & ACC_STATIC)
+ M_AST(REG_ATMP3, REG_SP, 1 * 4);
- /* env ist first argument */
- M_AMOV_IMM(_Jv_env, REG_ATMP1);
- M_AST(REG_ATMP1, REG_SP, 0 * 4);
+ /* env ist first argument */
+ M_AMOV_IMM(_Jv_env, REG_ATMP1);
+ M_AST(REG_ATMP1, REG_SP, 0 * 4);
+ }
/* call the native function */
M_JSR(REG_ATMP2);
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) */
/* stub defines ***************************************************************/
-#define COMPILERSTUB_CODESIZE (6+6+2)
+#define COMPILERSTUB_CODESIZE (2+2)
/* coldfire instruction format:
void md_param_alloc_native(methoddesc *md)
{
- /* For now use system ABI */
- md_param_alloc(md);
+ paramdesc *pd;
+ s4 stacksize;
+ s4 i;
+
+ pd = md->params;
+ stacksize = 0;
+
+ for (i=0; i<md->paramcount; i++, pd++) {
+ pd->inmemory = true;
+ pd->regoff = stacksize * 4;
+ pd->index = stacksize;
+ stacksize += IS_2_WORD_TYPE(md->paramtypes[i].type) ? 2:1;
+ }
+
+ md->memuse = stacksize;
+ md->argintreguse = 0;
+ md->argfltreguse = 0;
+ md->argadrreguse = 0;
+
}
for (i=0; i<md->paramcount; i++, pd++) {
pd->inmemory = true;
pd->regoff = stacksize * 8;
-/* stacksize += IS_2_WORD_TYPE(md->paramtypes[i].type) ? 2:1;*/
+ pd->index = stacksize;
+ stacksize ++;
}
md->memuse = stacksize;