diff options
author | Tanner Gooding <tagoo@outlook.com> | 2018-01-19 15:49:47 -0800 |
---|---|---|
committer | Tanner Gooding <tagoo@outlook.com> | 2018-01-19 16:18:56 -0800 |
commit | 34776bf5f6bba461b9f616744cb6e17962ccce3b (patch) | |
tree | 768391acd5293272dc92c6795d6fd78cef2d7eb8 /src/vm/methodtable.cpp | |
parent | 35af7047534f420cb098f496837d1d24a9aedb78 (diff) | |
download | coreclr-34776bf5f6bba461b9f616744cb6e17962ccce3b.tar.gz coreclr-34776bf5f6bba461b9f616744cb6e17962ccce3b.tar.bz2 coreclr-34776bf5f6bba461b9f616744cb6e17962ccce3b.zip |
Updating the VM to no longer treat the SIMD HWIntrinsic types as HFA or MultiReg structs.
Diffstat (limited to 'src/vm/methodtable.cpp')
-rw-r--r-- | src/vm/methodtable.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/vm/methodtable.cpp b/src/vm/methodtable.cpp index 24c69cfb01..76d490d251 100644 --- a/src/vm/methodtable.cpp +++ b/src/vm/methodtable.cpp @@ -2340,6 +2340,25 @@ bool MethodTable::ClassifyEightBytesWithManagedLayout(SystemVStructRegisterPassi nestingLevel * 5, "", this->GetDebugClassName())); return false; } + + // The SIMD Intrinsic types are meant to be handled specially and should not be passed as struct registers + if (IsIntrinsicType()) + { + LPCUTF8 namespaceName; + LPCUTF8 className = GetFullyQualifiedNameInfo(&namespaceName); + + if ((strcmp(className, "Vector256`1") == 0) || (strcmp(className, "Vector128`1") == 0) || + (strcmp(className, "Vector64`1") == 0)) + { + assert(strcmp(namespaceName, "System.Runtime.Intrinsics") == 0); + + LOG((LF_JIT, LL_EVERYTHING, "%*s**** ClassifyEightBytesWithManagedLayout: struct %s is a SIMD intrinsic type; will not be enregistered\n", + nestingLevel * 5, "", this->GetDebugClassName())); + + return false; + } + } + #ifdef _DEBUG LOG((LF_JIT, LL_EVERYTHING, "%*s**** Classify %s (%p), startOffset %d, total struct size %d\n", nestingLevel * 5, "", this->GetDebugClassName(), this, startOffsetOfStruct, helperPtr->structSize)); @@ -2619,6 +2638,24 @@ bool MethodTable::ClassifyEightBytesWithNativeLayout(SystemVStructRegisterPassin return false; } + // The SIMD Intrinsic types are meant to be handled specially and should not be passed as struct registers + if (IsIntrinsicType()) + { + LPCUTF8 namespaceName; + LPCUTF8 className = GetFullyQualifiedNameInfo(&namespaceName); + + if ((strcmp(className, "Vector256`1") == 0) || (strcmp(className, "Vector128`1") == 0) || + (strcmp(className, "Vector64`1") == 0)) + { + assert(strcmp(namespaceName, "System.Runtime.Intrinsics") == 0); + + LOG((LF_JIT, LL_EVERYTHING, "%*s**** ClassifyEightBytesWithNativeLayout: struct %s is a SIMD intrinsic type; will not be enregistered\n", + nestingLevel * 5, "", this->GetDebugClassName())); + + return false; + } + } + #ifdef _DEBUG LOG((LF_JIT, LL_EVERYTHING, "%*s**** Classify for native struct %s (%p), startOffset %d, total struct size %d\n", nestingLevel * 5, "", this->GetDebugClassName(), this, startOffsetOfStruct, helperPtr->structSize)); |