Contents of /trunk/mozilla-firefox/patches/mozilla-firefox-1.0.7-stack-direction.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1104 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1104 byte(s)
-import
1 | Index: js/src/jscpucfg.c |
2 | =================================================================== |
3 | RCS file: /cvsroot/mozilla/js/src/jscpucfg.c,v |
4 | retrieving revision 3.21 |
5 | diff -d -u -p -6 -r3.21 jscpucfg.c |
6 | --- js/src/jscpucfg.c 15 Nov 2003 00:10:56 -0000 3.21 |
7 | +++ js/src/jscpucfg.c 22 Oct 2004 06:24:32 -0000 |
8 | @@ -153,19 +153,32 @@ static int Log2(unsigned int n) |
9 | */ |
10 | static void BitsPerByte(void) |
11 | { |
12 | bpb = 8; |
13 | } |
14 | |
15 | +#ifdef __GNUC__ |
16 | + |
17 | +static int __attribute__((noinline)) StackGrowthDirection(int *dummy1addr) |
18 | +{ |
19 | + int *dummy2 = alloca (sizeof (int)); |
20 | + |
21 | + return (dummy2 < dummy1addr) ? -1 : 1; |
22 | +} |
23 | + |
24 | +#else /* __GNUC__ */ |
25 | + |
26 | static int StackGrowthDirection(int *dummy1addr) |
27 | { |
28 | int dummy2; |
29 | |
30 | return (&dummy2 < dummy1addr) ? -1 : 1; |
31 | } |
32 | |
33 | +#endif /* __GNUC__ */ |
34 | + |
35 | int main(int argc, char **argv) |
36 | { |
37 | int sizeof_char, sizeof_short, sizeof_int, sizeof_int64, sizeof_long, |
38 | sizeof_float, sizeof_double, sizeof_word, sizeof_dword; |
39 | int bits_per_int64_log2, align_of_short, align_of_int, align_of_long, |
40 | align_of_int64, align_of_float, align_of_double, align_of_pointer, |