/* -----------------------------------------------------------------------------
- * $Id: TailCalls.h,v 1.11 2002/08/21 22:06:03 ken Exp $
+ * $Id: TailCalls.h,v 1.14 2003/09/21 13:22:02 igloo Exp $
*
* (c) The GHC Team, 1998-1999
*
#define JMP_(cont) \
{ \
- void *target; \
+ void *__target; \
__DISCARD__(); \
- target = (void *)(cont); \
- goto *target; \
+ __target = (void *)(cont); \
+ goto *__target; \
}
#endif /* i386_TARGET_ARCH */
/* -----------------------------------------------------------------------------
+ Tail calling on x86_64
+ -------------------------------------------------------------------------- */
+
+#if x86_64_TARGET_ARCH
+
+#define JMP_(cont) \
+ { \
+ void *__target; \
+ __target = (void *)(cont); \
+ goto *__target; \
+ }
+
+#endif /* x86_64_TARGET_ARCH */
+
+/* -----------------------------------------------------------------------------
Tail calling on Sparc
-------------------------------------------------------------------------- */
#ifdef alpha_TARGET_ARCH
+#ifdef IN_STG_CODE
register void *_procedure __asm__("$27");
+#endif
#define JMP_(cont) \
do { _procedure = (void *)(cont); \