From 6d4468991897caa4df5e4170dfdf5bb65daf3c0e Mon Sep 17 00:00:00 2001 From: "wr%rosenauer.org" Date: Tue, 26 Jul 2005 13:28:08 +0000 Subject: [PATCH] Bug 302173 JS engine doesn't work on PPC/Linux because of gcc optimization, r+a=shaver --- js/src/jscpucfg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/src/jscpucfg.c b/js/src/jscpucfg.c index 66eb4b159c7..e02f33615d5 100644 --- a/js/src/jscpucfg.c +++ b/js/src/jscpucfg.c @@ -73,6 +73,12 @@ #endif /* CROSS_COMPILE */ +#ifdef __GNUC__ +#define NS_NEVER_INLINE __attribute__((noinline)) +#else +#define NS_NEVER_INLINE +#endif + typedef void *prword; struct align_short { @@ -148,7 +154,7 @@ static void BitsPerByte(void) bpb = 8; } -static int StackGrowthDirection(int *dummy1addr) +static int NS_NEVER_INLINE StackGrowthDirection(int *dummy1addr) { int dummy2;