Replace hfaType with GetHfaType() (dotnet/coreclr#26914)
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>
Fri, 27 Sep 2019 17:32:54 +0000 (13:32 -0400)
committerSergey Andreenko <seandree@microsoft.com>
Fri, 27 Sep 2019 17:32:54 +0000 (10:32 -0700)
* find src/jit -type f -exec sed -i -e 's/.*declspec.*hfaType.*//g' {} \;

More hfaTypes

* Compilation fix

Commit migrated from https://github.com/dotnet/coreclr/commit/321865f09c9f88f781d7b3ba09b3e8300e46ea3f

src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/morph.cpp

index fa88dfc..ae9bf87 100644 (file)
@@ -1517,7 +1517,6 @@ public:
         return (TARGET_POINTER_SIZE * this->numSlots);
     }
 
-    __declspec(property(get = GetHfaType)) var_types hfaType;
     var_types GetHfaType()
     {
 #ifdef FEATURE_HFA
@@ -1641,7 +1640,7 @@ public:
         {
 #ifdef _TARGET_ARM_
             // We counted the number of regs, but if they are DOUBLE hfa regs we have to double the size.
-            if (hfaType == TYP_DOUBLE)
+            if (GetHfaType() == TYP_DOUBLE)
             {
                 assert(!isSplit);
                 size <<= 1;
@@ -1649,13 +1648,13 @@ public:
 #elif defined(_TARGET_ARM64_)
             // We counted the number of regs, but if they are FLOAT hfa regs we have to halve the size,
             // or if they are SIMD16 vector hfa regs we have to double the size.
-            if (hfaType == TYP_FLOAT)
+            if (GetHfaType() == TYP_FLOAT)
             {
                 // Round up in case of odd HFA count.
                 size = (size + 1) >> 1;
             }
 #ifdef FEATURE_SIMD
-            else if (hfaType == TYP_SIMD16)
+            else if (GetHfaType() == TYP_SIMD16)
             {
                 size <<= 1;
             }
@@ -1679,7 +1678,7 @@ public:
 
         regNumber argReg = getRegNum(0);
 #ifdef _TARGET_ARM_
-        unsigned int regSize = (hfaType == TYP_DOUBLE) ? 2 : 1;
+        unsigned int regSize = (GetHfaType() == TYP_DOUBLE) ? 2 : 1;
 #else
         unsigned int regSize = 1;
 #endif
index 61019f9..2e37a9b 100644 (file)
@@ -3771,7 +3771,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
         }
 
         // Get information about this argument.
-        var_types hfaType            = argEntry->hfaType;
+        var_types hfaType            = argEntry->GetHfaType();
         bool      isHfaArg           = (hfaType != TYP_UNDEF);
         bool      isHfaRegArg        = argEntry->isHfaRegArg;
         unsigned  hfaSlots           = argEntry->numRegs;
@@ -4340,7 +4340,7 @@ void Compiler::fgMorphMultiregStructArgs(GenTreeCall* call)
             {
                 if (fgEntryPtr->isHfaArg)
                 {
-                    var_types hfaType = fgEntryPtr->hfaType;
+                    var_types hfaType = fgEntryPtr->GetHfaType();
                     unsigned  structSize;
                     if (argx->OperIs(GT_OBJ))
                     {
@@ -4526,7 +4526,7 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
     unsigned  elemSize                = 0;
     var_types type[MAX_ARG_REG_COUNT] = {}; // TYP_UNDEF = 0
 
-    hfaType = fgEntryPtr->hfaType;
+    hfaType = fgEntryPtr->GetHfaType();
     if (varTypeIsValidHfaType(hfaType)
 #if !defined(_HOST_UNIX_) && defined(_TARGET_ARM64_)
         && !fgEntryPtr->IsVararg()