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 */
\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? */
/*
"\tmovl 12(%%eax),%%ebp" \
: : "n" (RESERVED_C_STACK_BYTES) : "%eax");
-#endif /* __i[34]86__ */
+#endif /* __i[3456]86__ */
\end{code}
%************************************************************************
%************************************************************************
\begin{code}
-#if powerpc_TARGET_ARCH
+#if powerpc_TARGET_ARCH || rs6000_TARGET_ARCH
/* do FUNBEGIN/END the easy way */
#define FUNBEGIN __asm__ volatile ("--- BEGIN ---");
#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 */
__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 */