From 7bcfb12172cbc599c85bf843f4da790de465c43b Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 1 Dec 1999 14:20:11 +0000 Subject: [PATCH] [project @ 1999-12-01 14:20:11 by simonmar] Alpha fixes. --- ghc/rts/StgCRun.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc/rts/StgCRun.c b/ghc/rts/StgCRun.c index 71cdf06..3ce7803 100644 --- a/ghc/rts/StgCRun.c +++ b/ghc/rts/StgCRun.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgCRun.c,v 1.8 1999/11/03 15:00:21 simonmar Exp $ + * $Id: StgCRun.c,v 1.9 1999/12/01 14:20:11 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -145,6 +145,8 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { StgThreadReturnCode StgRun(StgFunPtr f, StgRegTable *basereg) { + StgThreadReturnCode ret; + __asm__ volatile ("stq $9,-8($30)\n\t" "stq $10,-16($30)\n\t" "stq $11,-24($30)\n\t" @@ -169,6 +171,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) __asm__ volatile (".align 3\n" ".globl " STG_RETURN "\n" STG_RETURN ":\n\t" + "lda %0,($14)\n\t" /* save R1 */ "lda $30,%0($30)\n\t" "ldq $9,-8($30)\n\t" "ldq $10,-16($30)\n\t" @@ -184,11 +187,12 @@ StgRun(StgFunPtr f, StgRegTable *basereg) "ldt $f6,-96($30)\n\t" "ldt $f7,-104($30)\n\t" "ldt $f8,-112($30)\n\t" - "ldt $f9,-120($30)" : : - "K" (RESERVED_C_STACK_BYTES+ + "ldt $f9,-120($30)" + : "=r" (ret) + : "K" (RESERVED_C_STACK_BYTES+ 8*sizeof(double)+8*sizeof(long))); - return (StgThreadReturnCode)R1.i; + return ret; } #endif /* alpha_TARGET_ARCH */ -- 1.7.10.4