summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2018-02-06 22:00:01 -0500
committerJan Kotas <jkotas@microsoft.com>2018-02-06 19:00:01 -0800
commitcd630351e7ed6a351ebc40eb2a105440788d6e92 (patch)
treece7846c10ebc99db1c9d2239213502d912f20259 /src
parent368bc3458f48e9628baef5f44a42749f6a5f0d63 (diff)
downloadcoreclr-cd630351e7ed6a351ebc40eb2a105440788d6e92.tar.gz
coreclr-cd630351e7ed6a351ebc40eb2a105440788d6e92.tar.bz2
coreclr-cd630351e7ed6a351ebc40eb2a105440788d6e92.zip
Disable crossgen for types containing intrinsic types (#16213)
Diffstat (limited to 'src')
-rw-r--r--src/vm/methodtablebuilder.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp
index dfb0ec471a..0ddbbbc84f 100644
--- a/src/vm/methodtablebuilder.cpp
+++ b/src/vm/methodtablebuilder.cpp
@@ -1500,20 +1500,6 @@ MethodTableBuilder::BuildMethodTableThrowing(
LPCUTF8 nameSpace;
HRESULT hr = GetMDImport()->GetNameOfTypeDef(bmtInternal->pType->GetTypeDefToken(), &className, &nameSpace);
- if (hr == S_OK && strcmp(nameSpace, "System.Runtime.Intrinsics") == 0)
- {
- if (IsCompilationProcess())
- {
- // Disable AOT compiling for the SIMD hardware intrinsic types. These types require special
- // ABI handling as they represent fundamental data types (__m64, __m128, and __m256) and not
- // aggregate or union types. See https://github.com/dotnet/coreclr/issues/15943
- //
- // Once they are properly handled according to the ABI requirements, we can remove this check
- // and allow them to be used in crossgen/AOT scenarios.
- COMPlusThrow(kTypeLoadException, IDS_EE_HWINTRINSIC_NGEN_DISALLOWED);
- }
- }
-
#if defined(_TARGET_ARM64_)
// All the funtions in System.Runtime.Intrinsics.Arm.Arm64 are hardware intrinsics.
if (hr == S_OK && strcmp(nameSpace, "System.Runtime.Intrinsics.Arm.Arm64") == 0)
@@ -9561,6 +9547,17 @@ void MethodTableBuilder::CheckForSystemTypes()
// These __m128 and __m256 types, among other requirements, are special in that they must always
// be aligned properly.
+ if (IsCompilationProcess())
+ {
+ // Disable AOT compiling for the SIMD hardware intrinsic types. These types require special
+ // ABI handling as they represent fundamental data types (__m64, __m128, and __m256) and not
+ // aggregate or union types. See https://github.com/dotnet/coreclr/issues/15943
+ //
+ // Once they are properly handled according to the ABI requirements, we can remove this check
+ // and allow them to be used in crossgen/AOT scenarios.
+ COMPlusThrow(kTypeLoadException, IDS_EE_HWINTRINSIC_NGEN_DISALLOWED);
+ }
+
if (strcmp(name, g_Vector64Name) == 0)
{
// The System V ABI for i386 defaults to 8-byte alignment for __m64, except for parameter passing,