From: Michael Starzinger Date: Mon, 24 Sep 2007 20:36:23 +0000 (+0200) Subject: * src/vm/jit/m68k/emit.c (emit_replacement_stubs): Removed obsolete function. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=8ce4f6a6ca4e07a66ebc2d88d9f1e1036f98461c;p=cacao.git * src/vm/jit/m68k/emit.c (emit_replacement_stubs): Removed obsolete function. * src/vm/jit/i386/linux/md-os.c: Reordered functions in file. --- diff --git a/src/vm/jit/i386/linux/md-os.c b/src/vm/jit/i386/linux/md-os.c index 7e7e0abdc..12d9a9eaf 100644 --- a/src/vm/jit/i386/linux/md-os.c +++ b/src/vm/jit/i386/linux/md-os.c @@ -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. diff --git a/src/vm/jit/m68k/emit.c b/src/vm/jit/m68k/emit.c index a97783ad2..50ed8d722 100644 --- a/src/vm/jit/m68k/emit.c +++ b/src/vm/jit/m68k/emit.c @@ -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) /*