diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2018-03-15 08:21:25 -0700 |
---|---|---|
committer | Carol Eidt <carol.eidt@microsoft.com> | 2018-04-17 16:15:14 -0700 |
commit | 32480530dbcd0936e4292bdd50e5a94002f8dba2 (patch) | |
tree | 333c33b54dce6addf25ec10419e7eb8ed742e05f /src/vm/class.h | |
parent | 963e5a9f08ed7c664036ef9b7050374b66f71d64 (diff) | |
download | coreclr-32480530dbcd0936e4292bdd50e5a94002f8dba2.tar.gz coreclr-32480530dbcd0936e4292bdd50e5a94002f8dba2.tar.bz2 coreclr-32480530dbcd0936e4292bdd50e5a94002f8dba2.zip |
Unix/x64 ABI cleanup
Eliminate `FEATURE_UNIX_AMD64_STRUCT_PASSING` and replace it with `UNIX_AMD64_ABI` when used alone. Both are currently defined; it is highly unlikely the latter will work alone; and it significantly clutters up the code, especially the JIT.
Also, fix the altjit support (now `UNIX_AMD64_ABI_ITF`) to *not* call `ClassifyEightBytes` if the struct is too large. Otherwise it asserts.
Diffstat (limited to 'src/vm/class.h')
-rw-r--r-- | src/vm/class.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/vm/class.h b/src/vm/class.h index 5e349f75b1..7533e9c02c 100644 --- a/src/vm/class.h +++ b/src/vm/class.h @@ -408,12 +408,12 @@ class EEClassLayoutInfo e_ZERO_SIZED = 0x04, // The size of the struct is explicitly specified in the meta-data. e_HAS_EXPLICIT_SIZE = 0x08, -#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING +#ifdef UNIX_AMD64_ABI #ifdef FEATURE_HFA -#error Can't have FEATURE_HFA and FEATURE_UNIX_AMD64_STRUCT_PASSING defined at the same time. +#error Can't have FEATURE_HFA and UNIX_AMD64_ABI defined at the same time. #endif // FEATURE_HFA e_NATIVE_PASS_IN_REGISTERS = 0x10, // Flag wheter a native struct is passed in registers. -#endif // FEATURE_UNIX_AMD64_STRUCT_PASSING +#endif // UNIX_AMD64_ABI #ifdef FEATURE_HFA // HFA type of the unmanaged layout e_R4_HFA = 0x10, @@ -510,13 +510,13 @@ class EEClassLayoutInfo return m_cbPackingSize; } -#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING +#ifdef UNIX_AMD64_ABI bool IsNativeStructPassedInRegisters() { LIMITED_METHOD_CONTRACT; return (m_bFlags & e_NATIVE_PASS_IN_REGISTERS) != 0; } -#endif // FEATURE_UNIX_AMD64_STRUCT_PASSING +#endif // UNIX_AMD64_ABI CorElementType GetNativeHFATypeRaw(); #ifdef FEATURE_HFA @@ -580,13 +580,13 @@ class EEClassLayoutInfo m_bFlags |= (hfaType == ELEMENT_TYPE_R4) ? e_R4_HFA : e_R8_HFA; } #endif -#ifdef FEATURE_UNIX_AMD64_STRUCT_PASSING +#ifdef UNIX_AMD64_ABI void SetNativeStructPassedInRegisters() { LIMITED_METHOD_CONTRACT; m_bFlags |= e_NATIVE_PASS_IN_REGISTERS; } -#endif // FEATURE_UNIX_AMD64_STRUCT_PASSING +#endif // UNIX_AMD64_ABI }; @@ -713,14 +713,14 @@ class EEClassOptionalFields #define MODULE_NON_DYNAMIC_STATICS ((DWORD)-1) DWORD m_cbModuleDynamicID; -#if defined(UNIX_AMD64_ABI) && defined(FEATURE_UNIX_AMD64_STRUCT_PASSING) +#if defined(UNIX_AMD64_ABI) // Number of eightBytes in the following arrays int m_numberEightBytes; // Classification of the eightBytes SystemVClassificationType m_eightByteClassifications[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // Size of data the eightBytes unsigned int m_eightByteSizes[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; -#endif // UNIX_AMD64_ABI && FEATURE_UNIX_AMD64_STRUCT_PASSING +#endif // UNIX_AMD64_ABI // Set default values for optional fields. inline void Init(); @@ -1589,7 +1589,7 @@ public: DWORD GetReliabilityContract(); -#if defined(UNIX_AMD64_ABI) && defined(FEATURE_UNIX_AMD64_STRUCT_PASSING) +#if defined(UNIX_AMD64_ABI) // Get number of eightbytes used by a struct passed in registers. inline int GetNumberEightBytes() { @@ -1626,7 +1626,7 @@ public: GetOptionalFields()->m_eightByteSizes[i] = eightByteSizes[i]; } } -#endif // UNIX_AMD64_ABI && FEATURE_UNIX_AMD64_STRUCT_PASSING +#endif // UNIX_AMD64_ABI #if defined(FEATURE_HFA) bool CheckForHFA(MethodTable ** pByValueClassCache); |