* src/vm/jit/arm/codegen.c (codegen_emit_stub_native): Removed patcher
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Sat, 13 Oct 2007 14:20:31 +0000 (16:20 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Sat, 13 Oct 2007 14:20:31 +0000 (16:20 +0200)
stub.

src/vm/jit/arm/codegen.c

index 1209f91905e6d2db584f21fd5b9f0ed4488c82f5..f3ee6e3baad21bf81b41f29636c2abac1ccbdd1b 100644 (file)
@@ -2895,7 +2895,8 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f, int s
        methoddesc  *md;
        s4           i, j;
        s4           t;
-       s4           disp, funcdisp, s1, s2;
+       int          s1, s2;
+       int          disp;
 
        /* get required compiler data */
 
@@ -2940,13 +2941,6 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f, int s
                emit_verbosecall_enter(jd);
 #endif
 
-       /* get function address (this must happen before the stackframeinfo) */
-
-       funcdisp = dseg_add_functionptr(cd, f);
-
-       if (f == NULL)
-               patcher_add_patch_ref(jd, PATCHER_resolve_native_function, m, funcdisp);
-
 #if defined(ENABLE_GC_CACAO)
        /* Save callee saved integer registers in stackframeinfo (GC may
           need to recover them during a collection). */
@@ -3047,9 +3041,10 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f, int s
                M_DSEG_LOAD(REG_A0, disp);
        }
 
-       /* do the native function call */
+       /* Call the native function. */
 
-       M_DSEG_BRANCH(funcdisp);
+       disp = dseg_add_functionptr(cd, f);
+       M_DSEG_BRANCH(disp);
 
        /* recompute pv */
        /* TODO: this is only needed because of the tracer ... do we