File tree Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Original file line number Diff line number Diff line change 18
18
// The amount of extra space at the end of each stack segment, available
19
19
// to the rt, compiler and dynamic linker for running small functions
20
20
// FIXME: We want this to be 128 but need to slim the red zone calls down
21
+ #define RZ_LINUX_32 1024 *20
22
+ #define RZ_LINUX_64 1024 *20
23
+ #define RZ_MAC_32 1024 *20
24
+ #define RZ_MAC_64 1024 *20
25
+ #define RZ_WIN_32 1024 *20
26
+
27
+ #ifdef __linux__
21
28
#ifdef __i386__
22
- #define RED_ZONE_SIZE 1024 *20
29
+ #define RED_ZONE_SIZE RZ_LINUX_32
30
+ #endif
31
+ #ifdef __x86_64__
32
+ #define RED_ZONE_SIZE RZ_LINUX_64
33
+ #endif
34
+ #endif
35
+ #ifdef __APPLE__
36
+ #ifdef __i386__
37
+ #define RED_ZONE_SIZE RZ_MAC_32
23
38
#endif
24
-
25
39
#ifdef __x86_64__
26
- #define RED_ZONE_SIZE 1024 *20
40
+ #define RED_ZONE_SIZE RZ_MAC_64
41
+ #endif
42
+ #endif
43
+ #ifdef __WIN32__
44
+ #ifdef __i386__
45
+ #define RED_ZONE_SIZE RZ_WIN_32
46
+ #endif
47
+ #ifdef __x86_64__
48
+ #define RED_ZONE_SIZE RZ_WIN_64
49
+ #endif
27
50
#endif
28
51
29
52
// Stack size
You can’t perform that action at this time.
0 commit comments