From 5cd3582febac17dba773f5c7db956fd862e2d716 Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Wed, 17 Apr 2019 11:18:09 -0700 Subject: [PATCH] Fix for Desktop build break --- src/jit/codegencommon.cpp | 4 ++-- src/jit/compiler.h | 8 ++++++-- src/jit/morph.cpp | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index c7a6e83..a5746c3 100644 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -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); diff --git a/src/jit/compiler.h b/src/jit/compiler.h index dec2343..9691aac 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -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 diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 83e069c..19a7394 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -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)); -- 2.7.4