* src/vm/jit/m68k/emit.c (emit_replacement_stubs): Removed obsolete function.
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Mon, 24 Sep 2007 20:36:23 +0000 (22:36 +0200)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Mon, 24 Sep 2007 20:36:23 +0000 (22:36 +0200)
* src/vm/jit/i386/linux/md-os.c: Reordered functions in file.

src/vm/jit/i386/linux/md-os.c
src/vm/jit/m68k/emit.c

index 7e7e0abdc3909f09992117b6a8b9ed2388e13a3b..12d9a9eafb555a3528b0b5e770d73a786d980edb 100644 (file)
@@ -181,33 +181,6 @@ void md_signal_handler_sigfpe(int sig, siginfo_t *siginfo, void *_p)
 }
 
 
-/* md_signal_handler_sigusr1 ***************************************************
-
-   Signal handler for suspending threads.
-
-*******************************************************************************/
-
-#if defined(ENABLE_THREADS) && defined(ENABLE_GC_CACAO)
-void md_signal_handler_sigusr1(int sig, siginfo_t *siginfo, void *_p)
-{
-       ucontext_t *_uc;
-       mcontext_t *_mc;
-       u1         *pc;
-       u1         *sp;
-
-       _uc = (ucontext_t *) _p;
-       _mc = &_uc->uc_mcontext;
-
-       /* get the PC and SP for this thread */
-       pc = (u1 *) _mc->gregs[REG_EIP];
-       sp = (u1 *) _mc->gregs[REG_ESP];
-
-       /* now suspend the current thread */
-       threads_suspend_ack(pc, sp);
-}
-#endif
-
-
 /* md_signal_handler_sigill ****************************************************
 
    Signal handler for hardware patcher traps (ud2).
@@ -262,6 +235,33 @@ void md_signal_handler_sigill(int sig, siginfo_t *siginfo, void *_p)
 }
 
 
+/* md_signal_handler_sigusr1 ***************************************************
+
+   Signal handler for suspending threads.
+
+*******************************************************************************/
+
+#if defined(ENABLE_THREADS) && defined(ENABLE_GC_CACAO)
+void md_signal_handler_sigusr1(int sig, siginfo_t *siginfo, void *_p)
+{
+       ucontext_t *_uc;
+       mcontext_t *_mc;
+       u1         *pc;
+       u1         *sp;
+
+       _uc = (ucontext_t *) _p;
+       _mc = &_uc->uc_mcontext;
+
+       /* get the PC and SP for this thread */
+       pc = (u1 *) _mc->gregs[REG_EIP];
+       sp = (u1 *) _mc->gregs[REG_ESP];
+
+       /* now suspend the current thread */
+       threads_suspend_ack(pc, sp);
+}
+#endif
+
+
 /* md_signal_handler_sigusr2 ***************************************************
 
    Signal handler for profiling sampling.
index a97783ad2af975a7f2c670f6be31555fd1b88fa9..50ed8d722180386ac04437a5f698e68e96164d1b 100644 (file)
@@ -479,74 +479,6 @@ void emit_branch(codegendata *cd, s4 disp, s4 condition, s4 reg, u4 opt)
        }
 }
 
-/* emit_replacement_stubs ******************************************************
-
-   Generates the code for the replacement stubs.
-
-*******************************************************************************/
-
-#if defined(ENABLE_REPLACEMENT)
-void emit_replacement_stubs(jitdata *jd)
-{
-       codegendata *cd;
-       codeinfo    *code;
-       rplpoint    *rplp;
-       s4           i;
-       s4           branchmpc;
-       s4           outcode;
-
-       /* get required compiler data */
-
-       cd   = jd->cd;
-       code = jd->code;
-
-       rplp = code->rplpoints;
-
-       /* store beginning of replacement stubs */
-
-       code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase);
-
-       for (i = 0; i < code->rplpointcount; ++i, ++rplp) {
-               /* do not generate stubs for non-trappable points */
-
-               if (rplp->flags & RPLPOINT_FLAG_NOTRAP)
-                       continue;
-
-               M_JSR_IMM(0);
-#if 0
-               /* check code segment size */
-
-               MCODECHECK(512);
-
-               /* note start of stub code */
-
-               outcode = (s4) (cd->mcodeptr - cd->mcodebase);
-
-               /* push address of `rplpoint` struct */
-                       
-               M_PUSH_IMM(rplp);
-
-               /* jump to replacement function */
-
-               M_PUSH_IMM(asm_replacement_out);
-               M_RET;
-
-               /* add jump reference for COUNTDOWN points */
-
-               if (rplp->flags & RPLPOINT_FLAG_COUNTDOWN) {
-
-                       branchmpc = (s4)rplp->pc + (7 + 6);
-
-                       md_codegen_patch_branch(cd, branchmpc, (s4) outcode);
-               }
-
-               assert(((cd->mcodeptr - cd->mcodebase) - outcode) == REPLACEMENT_STUB_SIZE);
-#endif
-       }
-}
-#endif /* defined(ENABLE_REPLACEMENT) */
-       
-
 
 #if !defined(NDEBUG)
 /*