* src/vm/jit/jit.cpp (jit_asm_compile): Changed signature and made
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Mon, 25 Aug 2008 08:15:33 +0000 (10:15 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Mon, 25 Aug 2008 08:15:33 +0000 (10:15 +0200)
extern "C".
* src/vm/jit/jit.hpp: Likewise.

src/vm/jit/jit.cpp
src/vm/jit/jit.hpp

index 1875ceb10716fd5c3d0ae6aaf59bf6fd7b3126f9..ece45abeb3c27048e1a8f5c9ae2f9ccb79976aca 100644 (file)
@@ -977,17 +977,18 @@ codeinfo *jit_get_current_code(methodinfo *m)
 
 #if defined(ENABLE_JIT)
 #if !defined(JIT_COMPILER_VIA_SIGNAL)
-u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra)
+extern "C" {
+void* jit_asm_compile(methodinfo *m, void* mptr, void* sp, void* ra)
 {
        stackframeinfo_t  sfi;
-       u1               *entrypoint;
-       u1               *pa;
-       ptrint           *p;
+       void             *entrypoint;
+       void             *pa;
+       uintptr_t        *p;
 
        /* create the stackframeinfo (subtract 1 from RA as it points to the */
        /* instruction after the call)                                       */
 
-       stacktrace_stackframeinfo_add(&sfi, NULL, sp, ra, ra-1);
+       stacktrace_stackframeinfo_add(&sfi, NULL, sp, ra, ((uint8_t*) ra) - 1);
 
        /* actually compile the method */
 
@@ -1008,9 +1009,9 @@ u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra)
 
        /* patch the method entry point */
 
-       p = (ptrint *) pa;
+       p = (uintptr_t*) pa;
 
-       *p = (ptrint) entrypoint;
+       *p = (uintptr_t) entrypoint;
 
        /* flush the instruction cache */
 
@@ -1018,6 +1019,7 @@ u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra)
 
        return entrypoint;
 }
+}
 #endif
 
 /* jit_compile_handle **********************************************************
index 2ee4248bcbef82427b38bbbc67be28ee6f72740d..bc896adcf29ceb48a3d725ee22ce227c3a585ce3 100644 (file)
@@ -449,7 +449,7 @@ void jit_request_optimization(methodinfo *m);
 
 /* patch the method entrypoint */
 #if !defined(JIT_COMPILER_VIA_SIGNAL)
-u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra);
+void *jit_asm_compile(methodinfo *m, void* mptr, void* sp, void* ra);
 #endif
 void *jit_compile_handle(methodinfo *m, void *pv, void *ra, void *mptr);