This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1499,7 +1499,21 @@ MethodTableBuilder::BuildMethodTableThrowing(
1499
1499
LPCUTF8 className;
1500
1500
LPCUTF8 nameSpace;
1501
1501
HRESULT hr = GetMDImport ()->GetNameOfTypeDef (bmtInternal->pType ->GetTypeDefToken (), &className, &nameSpace);
1502
-
1502
+
1503
+ if (hr == S_OK && strcmp (nameSpace, " System.Runtime.Intrinsics" ) == 0 )
1504
+ {
1505
+ if (IsCompilationProcess ())
1506
+ {
1507
+ // Disable AOT compiling for the SIMD hardware intrinsic types. These types require special
1508
+ // ABI handling as they represent fundamental data types (__m64, __m128, and __m256) and not
1509
+ // aggregate or union types. See https://github.com/dotnet/coreclr/issues/15943
1510
+ //
1511
+ // Once they are properly handled according to the ABI requirements, we can remove this check
1512
+ // and allow them to be used in crossgen/AOT scenarios.
1513
+ COMPlusThrow (kTypeLoadException , IDS_EE_HWINTRINSIC_NGEN_DISALLOWED);
1514
+ }
1515
+ }
1516
+
1503
1517
#if defined(_TARGET_ARM64_)
1504
1518
// All the funtions in System.Runtime.Intrinsics.Arm.Arm64 are hardware intrinsics.
1505
1519
if (hr == S_OK && strcmp (nameSpace, " System.Runtime.Intrinsics.Arm.Arm64" ) == 0 )
You can’t perform that action at this time.
0 commit comments