From 2f6e73fc393bb526e03f391bfa40c1912560e378 Mon Sep 17 00:00:00 2001 From: desrt Date: Mon, 22 Nov 2004 09:18:03 +0000 Subject: [PATCH] [project @ 2004-11-22 09:18:03 by desrt] #ifdef powerpc64: fixed errors in run/return code revealed by testing --- ghc/rts/StgCRun.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/ghc/rts/StgCRun.c b/ghc/rts/StgCRun.c index 8bb6f08..b835a49 100644 --- a/ghc/rts/StgCRun.c +++ b/ghc/rts/StgCRun.c @@ -654,9 +654,20 @@ static void StgRunIsImplementedInAssembler(void) // r13 thread local state (never modified, don't need to save) // r14-r31 callee-save __asm__ volatile ( - "\t.globl StgRun\n" - "\t.type StgRun,@function\n" + ".section \".opd\",\"aw\"\n" + ".align 3\n" + ".globl StgRun\n" "StgRun:\n" + "\t.quad\t.StgRun,.TOC.@tocbase,0\n" + "\t.size StgRun,24\n" + ".globl StgReturn\n" + "StgReturn:\n" + "\t.quad\t.StgReturn,.TOC.@tocbase,0\n" + "\t.size StgReturn,24\n" + ".previous\n" + ".globl .StgRun\n" + ".type .StgRun,@function\n" + ".StgRun:\n" "\tmflr 0\n" "\tmr 5, 1\n" "\tstd 0, 16(1)\n" @@ -703,9 +714,9 @@ static void StgRunIsImplementedInAssembler(void) "\tld 3, 0(3)\n" "\tmtctr 3\n" "\tbctr\n" - ".globl StgReturn\n" - "\t.type StgReturn,@function\n" - "StgReturn:\n" + ".globl .StgReturn\n" + ".type .StgReturn,@function\n" + ".StgReturn:\n" "\tmr 3,14\n" "\tla 5, %0(1)\n" // load address == addi r5, r1, %0 "\tld 2, -296(5)\n" -- 1.7.10.4