diff options
Diffstat (limited to 'rts/StgCRun.c')
-rw-r--r-- | rts/StgCRun.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/rts/StgCRun.c b/rts/StgCRun.c index e1b9a09359..3ce41a6483 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -632,56 +632,16 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { #define STG_GLOBAL ".globl " -#if defined(darwin_HOST_OS) -#define STG_HIDDEN ".private_extern " -#else #define STG_HIDDEN ".hidden " -#endif #if defined(aix_HOST_OS) // implementation is in StgCRunAsm.S -#elif defined(darwin_HOST_OS) -void StgRunIsImplementedInAssembler(void) -{ -#if HAVE_SUBSECTIONS_VIA_SYMBOLS - // if the toolchain supports deadstripping, we have to - // prevent it here (it tends to get confused here). - __asm__ volatile (".no_dead_strip _StgRunIsImplementedInAssembler\n"); -#endif - __asm__ volatile ( - STG_GLOBAL STG_RUN "\n" - STG_HIDDEN STG_RUN "\n" - STG_RUN ":\n" - "\tmflr r0\n" - "\tbl saveFP # f14\n" - "\tstmw r13,-220(r1)\n" - "\tstwu r1,-%0(r1)\n" - "\tmr r27,r4\n" // BaseReg == r27 - "\tmtctr r3\n" - "\tmr r12,r3\n" - "\tbctr\n" - ".globl _StgReturn\n" - "_StgReturn:\n" - "\tmr r3,r14\n" - "\tla r1,%0(r1)\n" - "\tlmw r13,-220(r1)\n" - "\tb restFP # f14\n" - : : "i"(RESERVED_C_STACK_BYTES+224 /*stack frame size*/)); -} #else // This version is for PowerPC Linux. -// Differences from the Darwin/Mac OS X version: -// *) Different Assembler Syntax -// *) Doesn't use Register Saving Helper Functions (although they exist somewhere) -// *) We may not access positive stack offsets -// (no "Red Zone" as in the Darwin ABI) -// *) The Link Register is saved to a different offset in the caller's stack frame -// (Linux: 4(r1), Darwin 8(r1)) - static void GNUC3_ATTRIBUTE(used) StgRunIsImplementedInAssembler(void) { |