From 6a9485d7f7d2c2d9f762215450c89e878ada13a4 Mon Sep 17 00:00:00 2001 From: igloo Date: Sun, 21 Sep 2003 13:22:03 +0000 Subject: [PATCH] [project @ 2003-09-21 13:22:01 by igloo] Alpha fixes. --- ghc/includes/Stg.h | 7 +++++-- ghc/includes/TailCalls.h | 4 +++- ghc/rts/Adjustor.c | 6 +++++- ghc/rts/Signals.c | 8 ++++++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index 05ae7d1..ff38173 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.55 2003/08/22 22:24:16 sof Exp $ + * $Id: Stg.h,v 1.56 2003/09/21 13:22:01 igloo Exp $ * * (c) The GHC Team, 1998-1999 * @@ -36,6 +36,10 @@ /* Configuration */ #include "config.h" +/* This needs to be up near the top as the register line on alpha needs + * to be before all procedures */ +#include "TailCalls.h" + #if __GNUC__ >= 3 /* Assume that a flexible array member at the end of a struct * can be defined thus: T arr[]; */ @@ -183,7 +187,6 @@ typedef StgWord64 LW_; #include "SMP.h" #include "MachRegs.h" #include "Regs.h" -#include "TailCalls.h" #include "Block.h" /* RTS public interface */ diff --git a/ghc/includes/TailCalls.h b/ghc/includes/TailCalls.h index 950d8f1..05dc852 100644 --- a/ghc/includes/TailCalls.h +++ b/ghc/includes/TailCalls.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: TailCalls.h,v 1.13 2003/08/29 16:00:26 simonmar Exp $ + * $Id: TailCalls.h,v 1.14 2003/09/21 13:22:02 igloo Exp $ * * (c) The GHC Team, 1998-1999 * @@ -98,7 +98,9 @@ extern void __DISCARD__(void); #ifdef alpha_TARGET_ARCH +#ifdef IN_STG_CODE register void *_procedure __asm__("$27"); +#endif #define JMP_(cont) \ do { _procedure = (void *)(cont); \ diff --git a/ghc/rts/Adjustor.c b/ghc/rts/Adjustor.c index 4dca29e..e9fc769 100644 --- a/ghc/rts/Adjustor.c +++ b/ghc/rts/Adjustor.c @@ -73,7 +73,11 @@ static unsigned char __obscure_ccall_ret_code [] = #if defined(alpha_TARGET_ARCH) /* To get the definition of PAL_imb: */ -#include +# if defined(linux_TARGET_OS) +# include +# else +# include +# endif #endif #if defined(ia64_TARGET_ARCH) diff --git a/ghc/rts/Signals.c b/ghc/rts/Signals.c index 4773006..749a683 100644 --- a/ghc/rts/Signals.c +++ b/ghc/rts/Signals.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Signals.c,v 1.37 2003/04/01 15:05:22 sof Exp $ + * $Id: Signals.c,v 1.38 2003/09/21 13:22:03 igloo Exp $ * * (c) The GHC Team, 1998-1999 * @@ -19,7 +19,11 @@ #include "StablePriv.h" #ifdef alpha_TARGET_ARCH -# include +# if defined(linux_TARGET_OS) +# include +# else +# include +# endif #endif #ifdef HAVE_UNISTD_H -- 1.7.10.4