diff options
author | Tanner Gooding <tagoo@outlook.com> | 2018-01-20 10:23:52 -0800 |
---|---|---|
committer | Tanner Gooding <tagoo@outlook.com> | 2018-01-21 18:17:18 -0800 |
commit | 441487910f9b183bb41deffe9476cd87c1c2ba6b (patch) | |
tree | 15f4317d080d0df4459766b7d42136b8b3732119 /src | |
parent | 34776bf5f6bba461b9f616744cb6e17962ccce3b (diff) | |
download | coreclr-441487910f9b183bb41deffe9476cd87c1c2ba6b.tar.gz coreclr-441487910f9b183bb41deffe9476cd87c1c2ba6b.tar.bz2 coreclr-441487910f9b183bb41deffe9476cd87c1c2ba6b.zip |
Stop the SIMD hardware intrinsics types from undergoing crossgen.
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/methodtablebuilder.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp index d25fc95054..a47e464d72 100644 --- a/src/vm/methodtablebuilder.cpp +++ b/src/vm/methodtablebuilder.cpp @@ -1499,7 +1499,21 @@ MethodTableBuilder::BuildMethodTableThrowing( LPCUTF8 className; 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) |