[project @ 1998-02-05 12:23:33 by simonm]
[ghc-hetmet.git] / ghc / includes / COptJumps.lh
index c07fcca..3c10677 100644 (file)
@@ -37,10 +37,9 @@ variant, too, for that matter).
 GCC will have assumed that pushing/popping of C-stack frames is going
 on when it generated its code, and used stack space accordingly.
 However, we actually {\em post-process away} all such stack-framery
-(see \tr{ghc/driver/ghc-asm.lprl}).
-Thing will be OK however, if we initially make sure there are
-@RESERVED_C_STACK_BYTES@ on the C-stack to begin with, for local
-variables.
+(see \tr{ghc/driver/ghc-asm.lprl}). Things will be OK however, if we
+initially make sure there are @RESERVED_C_STACK_BYTES@ on the C-stack
+to begin with, for local variables.
 
 \begin{code}
 #define RESERVED_C_STACK_BYTES (512 * sizeof(I_))  /* MUST BE OF GENEROUS ALIGNMENT */
@@ -61,7 +60,7 @@ It seems that \tr{_procedure} can't be declared within the body of the
 \tr{JMP_} macro...at least, not if we want it to be \$27, which we do!
 
 \begin{code}
-#if alpha_dec_osf1_TARGET
+#if alpha_TARGET_ARCH
     /* ToDo: less specific? */
 
 /*
@@ -327,7 +326,7 @@ extern void __DISCARD__(STG_NO_ARGS);
                      "\tmovl 12(%%eax),%%ebp"          \
                        : : "n" (RESERVED_C_STACK_BYTES) : "%eax");
 
-#endif /* __i[34]86__ */
+#endif /* __i[3456]86__ */
 \end{code}
 
 %************************************************************************
@@ -464,7 +463,7 @@ extern void __DISCARD__(STG_NO_ARGS);
 %************************************************************************
 
 \begin{code}
-#if powerpc_TARGET_ARCH
+#if powerpc_TARGET_ARCH || rs6000_TARGET_ARCH
 
 /* do FUNBEGIN/END the easy way */
 #define FUNBEGIN    __asm__ volatile ("--- BEGIN ---");
@@ -488,6 +487,12 @@ extern void __DISCARD__(STG_NO_ARGS);
 #define MINI_INTERPRETER_SETUP                 \
     StgChar space[RESERVED_C_STACK_BYTES+6*sizeof(double)+19*sizeof(long)]; \
     __asm__ volatile ("stm  13,-176(1)\n"      \
+                      "\tstfd 14,-200(1)\n"     \
+                      "\tstfd 15,-208(1)\n"     \
+                      "\tstfd 16,-216(1)\n"     \
+                      "\tstfd 17,-224(1)\n"     \
+                      "\tstfd 18,-232(1)\n"     \
+                      "\tstfd 19,-240(1)\n"     \
                       : : "I" (RESERVED_C_STACK_BYTES+16) : "1" );
 
     /* the 16 bytes is for the argument-register save-area above $sp */
@@ -496,6 +501,12 @@ extern void __DISCARD__(STG_NO_ARGS);
     __asm__ volatile (".globl miniInterpretEnd\n" \
                       "miniInterpretEnd:\n"            \
                      "\tlm 13,-176(1)\n"       \
+                      "\tlfd 14,-200(1)\n"      \
+                      "\tlfd 15,-208(1)\n"      \
+                      "\tlfd 16,-216(1)\n"      \
+                      "\tlfd 17,-224(1)\n"      \
+                      "\tlfd 18,-232(1)\n"      \
+                      "\tlfd 19,-240(1)\n"      \
                       : : "I" (RESERVED_C_STACK_BYTES+16) : "1" );
 
 #endif /* powerpc */