X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2Fincludes%2FCOptWraps.lh;h=baf217b6635f342110b82151eb35f469425e52a5;hp=4334caec34243cb9e6a59542b2b72d380864c6e1;hb=5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d;hpb=f7ecf7234c224489be8a5e63fced903b655d92ee diff --git a/ghc/includes/COptWraps.lh b/ghc/includes/COptWraps.lh index 4334cae..baf217b 100644 --- a/ghc/includes/COptWraps.lh +++ b/ghc/includes/COptWraps.lh @@ -613,11 +613,10 @@ gets whatever it's after. "\tstd %i2,[%fp-32]\n" \ "\tstd %i4,[%fp-24]"); -/* We leave nothing to chance here; we have seen - GCC stick "unwanted" code in the branch delay - slot, causing mischief (WDP 96/05) +/* Lest GCC attempt to stick something in + the delay slot: with compile with + -fno-delayed-branch. A weak solution. WDP 96/07 */ -#ifdef GRAN #define MAGIC_CALL \ __asm__ volatile ( \ "ld [%%fp-40],%%o5\n" \ @@ -631,7 +630,16 @@ gets whatever it's after. __asm__ volatile ( \ "std %f0,[%fp-40]\n" \ "\tstd %o0,[%fp-32]"); -#else +#if 0 +/* We leave nothing to chance here; we have seen + GCC stick "unwanted" code in the branch delay + slot, causing mischief (WDP 96/05) +*/ +/* the problem with this one: GCC has no way of + knowing there is a "call" in there, so it + does not do any calling-convention stuff + (e.g., saving used regs). WDP 96/07 +*/ #define MAGIC_CALL \ __asm__ volatile ( \ "ld [%%fp-40],%%o5\n" \ @@ -644,8 +652,8 @@ gets whatever it's after. "\tnop\n" \ "\tstd %%f0,[%%fp-40]\n"\ "\tstd %%o0,[%%fp-32]" \ - : : : "%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%f0", "%g1", "%g2", "%g3", "%g4", "memory"); -#endif + : : : "%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%o7", "%f0", "memory"); +#endif /* 0 */ #define MAGIC_RETURN \ __asm__ volatile ( \