X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FTailCalls.h;h=bdcc40030951012baf25f24b9db90e068eddd47f;hb=158f8ac6cc3d73ad776056d2a86196a1fc7d8703;hp=1f562ebc83fcf9103d78ab98e3409b9ace267e4b;hpb=4de89387828380532a2b2b6528548e3b6fb944bc;p=ghc-hetmet.git diff --git a/ghc/includes/TailCalls.h b/ghc/includes/TailCalls.h index 1f562eb..bdcc400 100644 --- a/ghc/includes/TailCalls.h +++ b/ghc/includes/TailCalls.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: TailCalls.h,v 1.12 2003/01/06 13:11:26 simonmar Exp $ + * $Id: TailCalls.h,v 1.15 2003/10/12 13:24:52 igloo Exp $ * * (c) The GHC Team, 1998-1999 * @@ -60,6 +60,21 @@ extern void __DISCARD__(void); #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 -------------------------------------------------------------------------- */ @@ -83,7 +98,9 @@ extern void __DISCARD__(void); #ifdef alpha_TARGET_ARCH +#if IN_STG_CODE register void *_procedure __asm__("$27"); +#endif #define JMP_(cont) \ do { _procedure = (void *)(cont); \