Fix for Desktop build break
authorBrian Sullivan <briansul@microsoft.com>
Wed, 17 Apr 2019 18:18:09 +0000 (11:18 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Wed, 17 Apr 2019 18:18:33 +0000 (11:18 -0700)
src/jit/codegencommon.cpp
src/jit/compiler.h
src/jit/morph.cpp

index c7a6e83..a5746c3 100644 (file)
@@ -10204,7 +10204,7 @@ var_types Compiler::GetHfaType(CORINFO_CLASS_HANDLE hClass)
     {
 #ifdef FEATURE_HFA
         CorInfoType corType = info.compCompHnd->getHFAType(hClass);
-#ifdef _TARGET_ARM64_
+#if defined(_TARGET_ARM64_) && defined(FEATURE_SIMD)
         if (corType == CORINFO_TYPE_VALUECLASS)
         {
             // This is a vector type.
@@ -10215,7 +10215,7 @@ var_types Compiler::GetHfaType(CORINFO_CLASS_HANDLE hClass)
             compFloatingPointUsed = true;
         }
         else
-#endif // _TARGET_ARM64_
+#endif // _TARGET_ARM64_ && FEATURE_SIMD
             if (corType != CORINFO_TYPE_UNDEF)
         {
             result = JITtype2varType(corType);
index dec2343..9691aac 100644 (file)
@@ -1082,8 +1082,9 @@ public:
 #ifdef FEATURE_HFA
         assert(lvIsHfa());
         return HfaTypeFromElemKind(_lvHfaElemKind);
-#endif // FEATURE_HFA
+#else
         return TYP_UNDEF;
+#endif // FEATURE_HFA
     }
 
     void SetHfaType(var_types type)
@@ -1642,8 +1643,9 @@ public:
     {
 #ifdef FEATURE_HFA
         return HfaTypeFromElemKind(_hfaElemKind);
-#endif // FEATURE_HFA
+#else
         return TYP_UNDEF;
+#endif // FEATURE_HFA
     }
 
     void SetHfaType(var_types type, unsigned hfaSlots)
@@ -1773,10 +1775,12 @@ public:
                 // Round up in case of odd HFA count.
                 size = (size + 1) >> 1;
             }
+#ifdef FEATURE_SIMD
             else if (hfaType == TYP_SIMD16)
             {
                 size <<= 1;
             }
+#endif
 #endif // _TARGET_ARM64_
         }
 #endif // FEATURE_HFA
index 83e069c..19a7394 100644 (file)
@@ -4695,9 +4695,9 @@ GenTree* Compiler::fgMorphMultiregStructArg(GenTree* arg, fgArgTabEntry* fgEntry
             // We have a HFA struct.
             // Note that GetHfaType may not be the same as elemType, since TYP_SIMD8 is handled the same as TYP_DOUBLE.
             var_types useElemType = elemType;
-#ifdef _TARGET_ARM64_
+#if defined(_TARGET_ARM64_) & defined(FEATURE_SIMD)
             useElemType = (elemType == TYP_SIMD8) ? TYP_DOUBLE : useElemType;
-#endif // _TARGET_ARM64_
+#endif // _TARGET_ARM64_ && FEATURE_SIMD
             noway_assert(useElemType == varDsc->GetHfaType());
             noway_assert(elemSize == genTypeSize(elemType));
             noway_assert(elemCount == (varDsc->lvExactSize / elemSize));