diff options
Diffstat (limited to 'src/jit/jit.h')
-rw-r--r-- | src/jit/jit.h | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/src/jit/jit.h b/src/jit/jit.h index 05b154e15a..ee3f8c9117 100644 --- a/src/jit/jit.h +++ b/src/jit/jit.h @@ -172,6 +172,31 @@ #define _TARGET_ARMARCH_ #endif +// If the UNIX_AMD64_ABI is defined make sure that _TARGET_AMD64_ is also defined. +#if defined(UNIX_AMD64_ABI) +#if !defined(_TARGET_AMD64_) +#error When UNIX_AMD64_ABI is defined you must define _TARGET_AMD64_ defined as well. +#endif +#endif + +// If the UNIX_X86_ABI is defined make sure that _TARGET_X86_ is also defined. +#if defined(UNIX_X86_ABI) +#if !defined(_TARGET_X86_) +#error When UNIX_X86_ABI is defined you must define _TARGET_X86_ defined as well. +#endif +#endif + +#if defined(PLATFORM_UNIX) +#define _HOST_UNIX_ +#endif + +// Are we generating code to target Unix? This is true if we will run on Unix (_HOST_UNIX_ is defined). +// It's also true if we are building an altjit targetting Unix, which we determine by checking if either +// UNIX_AMD64_ABI or UNIX_X86_ABI is defined. +#if defined(_HOST_UNIX_) || ((defined(UNIX_AMD64_ABI) || defined(UNIX_X86_ABI)) && defined(ALT_JIT)) +#define _TARGET_UNIX_ +#endif + // -------------------------------------------------------------------------------- // IMAGE_FILE_MACHINE_TARGET // -------------------------------------------------------------------------------- @@ -190,7 +215,14 @@ // Include the AMD64 unwind codes when appropriate. #if defined(_TARGET_AMD64_) +// We need to temporarily set PLATFORM_UNIX, if necessary, to get the Unix-specific unwind codes. +#if defined(_TARGET_UNIX_) && !defined(_HOST_UNIX_) +#define PLATFORM_UNIX +#endif #include "win64unwind.h" +#if defined(_TARGET_UNIX_) && !defined(_HOST_UNIX_) +#undef PLATFORM_UNIX +#endif #endif // Macros for defining strongly-typed enums. Use as follows: @@ -216,23 +248,6 @@ #define __PLACEMENT_NEW_INLINE // don't bring in the global placement new, it is easy to make a mistake // with our new(compiler*) pattern. -#if COR_JIT_EE_VER > 460 -#define NO_CLRCONFIG // Don't bring in the usual CLRConfig infrastructure, since the JIT uses the JIT/EE - // interface to retrieve config values. - -// This is needed for contract.inl when FEATURE_STACK_PROBE is enabled. -struct CLRConfig -{ - static struct ConfigKey - { - } EXTERNAL_NO_SO_NOT_MAINLINE; - static DWORD GetConfigValue(const ConfigKey& key) - { - return 0; - } -}; -#endif - #include "utilcode.h" // this defines assert as _ASSERTE #include "host.h" // this redefines assert for the JIT to use assertAbort #include "utils.h" @@ -727,17 +742,6 @@ private: /*****************************************************************************/ -#define SECURITY_CHECK 1 -#define VERIFY_IMPORTER 1 - -/*****************************************************************************/ - -#if !defined(RELOC_SUPPORT) -#define RELOC_SUPPORT 1 -#endif - -/*****************************************************************************/ - #include "error.h" /*****************************************************************************/ |