}
-/* 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).
}
+/* 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.
}
}
-/* 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)
/*