Use __DISCARD__ to prevent overly aggressive optimization by certain
gcc versions on the Alpha. Thanks to Jeffrey Lewis!
# toss all calls to __DISCARD__
$c =~ s/^\t(call|jbsr|jal)\s+${T_US}__DISCARD__\n//go;
+ $c =~ s/^\tjsr\s+\$26\s*,\s*${T_US}__DISCARD__\n//go if $TargetPlatform =~ /^alpha-/;
$c =~ s/^\tbl\s+L___DISCARD__\$stub\n//go if $TargetPlatform =~ /^powerpc-apple-.*/;
# IA64: mangle tailcalls into jumps here
/* -----------------------------------------------------------------------------
- * $Id: TailCalls.h,v 1.10 2002/06/03 13:08:41 matthewc Exp $
+ * $Id: TailCalls.h,v 1.11 2002/08/21 22:06:03 ken Exp $
*
* (c) The GHC Team, 1998-1999
*
register void *_procedure __asm__("$27");
-#define JMP_(cont) \
- do { _procedure = (void *)(cont); \
- goto *_procedure; \
+#define JMP_(cont) \
+ do { _procedure = (void *)(cont); \
+ __DISCARD__(); \
+ goto *_procedure; \
} while(0)
/* Don't need these for alpha mangling */