Revert some changes which don't have proper dependencies.
[mono-project.git] / mono / sgen / sgen-archdep.h
blob125065ca2bfab595a444b78973a271e97286253f
1 /**
2 * \file
3 * Architecture dependent parts of SGen.
5 * Copyright 2001-2003 Ximian, Inc
6 * Copyright 2003-2010 Novell, Inc.
7 * Copyright (C) 2012 Xamarin Inc
9 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
11 #ifndef __MONO_SGENARCHDEP_H__
12 #define __MONO_SGENARCHDEP_H__
14 #include <mono/utils/mono-context.h>
16 #if defined(MONO_CROSS_COMPILE)
18 #define REDZONE_SIZE 0
20 #elif defined(TARGET_X86)
22 #define REDZONE_SIZE 0
24 #ifndef MONO_ARCH_HAS_MONO_CONTEXT
25 #error 0
26 #endif
28 #elif defined(TARGET_AMD64)
30 #ifdef HOST_WIN32
31 /* The Windows x64 ABI defines no "red zone". The ABI states:
32 "All memory beyond the current address of RSP is considered volatile" */
33 #define REDZONE_SIZE 0
34 #else
35 #define REDZONE_SIZE 128
36 #endif
38 #elif defined(TARGET_POWERPC)
40 #define REDZONE_SIZE 224
42 #elif defined(TARGET_ARM)
44 #define REDZONE_SIZE 0
46 #elif defined(TARGET_ARM64)
48 #if defined(__APPLE__)
49 #define REDZONE_SIZE 128
50 #else
51 #define REDZONE_SIZE 0
52 #endif
54 #elif defined(__mips__)
56 #define REDZONE_SIZE 0
58 #elif defined(__s390x__)
60 #define REDZONE_SIZE 0
62 #elif defined(__sparc__)
64 #define REDZONE_SIZE 0
66 #elif defined (TARGET_RISCV)
68 #define REDZONE_SIZE (0)
70 #elif defined (TARGET_WASM)
72 #define REDZONE_SIZE 0
74 #endif
76 #endif /* __MONO_SGENARCHDEP_H__ */