diff --git a/src/coreclr/jit/cpp.hint b/src/coreclr/jit/cpp.hint index b2fe33cc9815a0..07d74822b3ed76 100644 --- a/src/coreclr/jit/cpp.hint +++ b/src/coreclr/jit/cpp.hint @@ -7,21 +7,11 @@ // See the article on hints in MSDN for more information on their necessity and use: // http://msdn.microsoft.com/en-us/library/dd997977.aspx -#define foreach_treenode_execution_order(__node, __stmt) for (;;) - #define foreach_block(__compiler, __block) for (;;) #define FOREACH_REGISTER_FILE(file) for (;;) // From jit.h -#define DECLARE_TYPED_ENUM(tag,baseType) enum tag : baseType - -#define END_DECLARE_TYPED_ENUM(tag,baseType) ; - #define INDEBUG(x) x -#define INDEBUG_COMMA(x) x, #define DEBUGARG(x) , x - -#define PROTO_ARG(x) x , -#define PROTO_ARGL(x) , x \ No newline at end of file diff --git a/src/coreclr/jit/jit.h b/src/coreclr/jit/jit.h index 1a5c80c3218aa1..2dd39559c282ee 100644 --- a/src/coreclr/jit/jit.h +++ b/src/coreclr/jit/jit.h @@ -86,9 +86,6 @@ #if defined(TARGET_ARM64) #error Cannot define both TARGET_X86 and TARGET_ARM64 #endif -#if !defined(HOST_X86) -#define _CROSS_COMPILER_ -#endif #elif defined(TARGET_AMD64) #if defined(TARGET_X86) #error Cannot define both TARGET_AMD64 and TARGET_X86 @@ -99,9 +96,6 @@ #if defined(TARGET_ARM64) #error Cannot define both TARGET_AMD64 and TARGET_ARM64 #endif -#if !defined(HOST_AMD64) -#define _CROSS_COMPILER_ -#endif #elif defined(TARGET_ARM) #if defined(TARGET_X86) #error Cannot define both TARGET_ARM and TARGET_X86 @@ -112,9 +106,6 @@ #if defined(TARGET_ARM64) #error Cannot define both TARGET_ARM and TARGET_ARM64 #endif -#if !defined(HOST_ARM) -#define _CROSS_COMPILER_ -#endif #elif defined(TARGET_ARM64) #if defined(TARGET_X86) #error Cannot define both TARGET_ARM64 and TARGET_X86 @@ -125,9 +116,6 @@ #if defined(TARGET_ARM) #error Cannot define both TARGET_ARM64 and TARGET_ARM #endif -#if !defined(HOST_ARM64) -#define _CROSS_COMPILER_ -#endif #else #error Unsupported or unset target architecture #endif @@ -198,11 +186,9 @@ #ifdef DEBUG #define INDEBUG(x) x -#define INDEBUG_COMMA(x) x, #define DEBUGARG(x) , x #else #define INDEBUG(x) -#define INDEBUG_COMMA(x) #define DEBUGARG(x) #endif @@ -223,7 +209,7 @@ #if defined(DEBUG) && !defined(OSX_ARM64_ABI) // On all platforms except Arm64 OSX arguments on the stack are taking // register size slots. On these platforms we could check that stack slots count -// matchs out new byte size calculations. +// matches our new byte size calculations. #define DEBUG_ARG_SLOTS #endif @@ -239,11 +225,6 @@ #if defined(UNIX_AMD64_ABI) || !defined(TARGET_64BIT) || defined(TARGET_ARM64) #define FEATURE_PUT_STRUCT_ARG_STK 1 -#define PUT_STRUCT_ARG_STK_ONLY_ARG(x) , x -#define PUT_STRUCT_ARG_STK_ONLY(x) x -#else -#define PUT_STRUCT_ARG_STK_ONLY_ARG(x) -#define PUT_STRUCT_ARG_STK_ONLY(x) #endif #if defined(UNIX_AMD64_ABI) @@ -297,8 +278,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #define INFO6 LL_INFO10000 // Did Jit or Inline succeeded? #define INFO7 LL_INFO100000 // NYI stuff #define INFO8 LL_INFO1000000 // Weird failures -#define INFO9 LL_EVERYTHING // Info about incoming settings -#define INFO10 LL_EVERYTHING // Totally verbose #endif // DEBUG @@ -308,11 +287,6 @@ const CORINFO_CLASS_HANDLE NO_CLASS_HANDLE = (CORINFO_CLASS_HANDLE) nullptr; /*****************************************************************************/ -inline bool False() -{ - return false; -} // Use to disable code while keeping prefast happy - // We define two IL offset types, as follows: // // IL_OFFSET: either a distinguished value, or an IL offset. @@ -496,21 +470,17 @@ class GlobalJitOptions #endif /*****************************************************************************/ -#ifdef DEBUG -/*****************************************************************************/ - -#define DUMPER - -#else // !DEBUG +#if !defined(DEBUG) #if DUMP_GC_TABLES #pragma message("NOTE: this non-debug build has GC ptr table dumping always enabled!") -const bool dspGCtbls = true; +const bool dspGCtbls = true; #endif -/*****************************************************************************/ #endif // !DEBUG +/*****************************************************************************/ + #ifdef DEBUG #define JITDUMP(...) \ { \ @@ -591,21 +561,8 @@ inline bool IsUninitialized(T data); /*****************************************************************************/ -enum accessLevel -{ - ACL_NONE, - ACL_PRIVATE, - ACL_DEFAULT, - ACL_PROTECTED, - ACL_PUBLIC, -}; - -/*****************************************************************************/ - #define castto(var, typ) (*(typ*)&var) -#define sizeto(typ, mem) (offsetof(typ, mem) + sizeof(((typ*)0)->mem)) - /*****************************************************************************/ #ifdef NO_MISALIGNED_ACCESS @@ -645,23 +602,11 @@ inline size_t roundUp(size_t size, size_t mult = sizeof(size_t)) return (size + (mult - 1)) & ~(mult - 1); } -inline size_t roundDn(size_t size, size_t mult = sizeof(size_t)) -{ - assert(mult && ((mult & (mult - 1)) == 0)); // power of two test - - return (size) & ~(mult - 1); -} - #ifdef HOST_64BIT inline unsigned int roundUp(unsigned size, unsigned mult) { return (unsigned int)roundUp((size_t)size, (size_t)mult); } - -inline unsigned int roundDn(unsigned size, unsigned mult) -{ - return (unsigned int)roundDn((size_t)size, (size_t)mult); -} #endif // HOST_64BIT inline unsigned int unsigned_abs(int x) @@ -698,12 +643,6 @@ class Histogram #endif // CALL_ARG_STATS || COUNT_BASIC_BLOCKS || COUNT_LOOPS || EMITTER_STATS || MEASURE_NODE_SIZE -/*****************************************************************************/ -#ifdef ICECAP -#include "icapexp.h" -#include "icapctrl.h" -#endif - /*****************************************************************************/ #include "error.h" @@ -783,10 +722,6 @@ extern int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd, const size_t MAX_USHORT_SIZE_T = static_cast(static_cast(-1)); const size_t MAX_UNSIGNED_SIZE_T = static_cast(static_cast(-1)); -// These assume 2's complement... -const int MAX_SHORT_AS_INT = 32767; -const int MIN_SHORT_AS_INT = -32768; - /*****************************************************************************/ class Compiler;