From f87c34ccfc93a35407ce15468ee490779ff8e6c0 Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Tue, 3 Oct 2017 14:58:17 -0700 Subject: [PATCH 1/2] Fix for x86 JIT build break [tfs-changeset: 1677224] --- src/jit/importer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 2ec873e23cea..f8c9ba54c4f8 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -3762,7 +3762,9 @@ GenTreePtr Compiler::impIntrinsic(GenTreePtr newobjThis, { assert(retNode == nullptr); const NamedIntrinsic ni = lookupNamedIntrinsic(method); -#ifdef _TARGET_XARCH_ +#ifdef _TARGET_AMD64_ + // impX86HWIntrinsic :: Only supported for 64-bit + // if (ni > NI_HW_INTRINSIC_START && ni < NI_HW_INTRINSIC_END) { retNode = impX86HWIntrinsic(ni, method, sig); @@ -3990,13 +3992,16 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) } } -#ifdef _TARGET_XARCH_ +#ifdef _TARGET_AMD64_ + // lookupHWIntrinsicISA :: Only supported for 64-bit + // if ((namespaceName != nullptr) && strcmp(namespaceName, "System.Runtime.Intrinsics.X86") == 0) { InstructionSet isa = lookupHWIntrinsicISA(className); result = lookupHWIntrinsic(methodName, isa); } #endif + return result; } From 44228205d9ce0c25d6f11638c17cfe07b1d7baab Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Wed, 4 Oct 2017 10:15:26 -0700 Subject: [PATCH 2/2] Allow X86 Hardware intrinsics for non-Legacy 32-bit x86 Unit tests exisist for this functionality on x86 CoreCLR [tfs-changeset: 1677287] --- src/jit/importer.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index f8c9ba54c4f8..73310076211a 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -3762,9 +3762,7 @@ GenTreePtr Compiler::impIntrinsic(GenTreePtr newobjThis, { assert(retNode == nullptr); const NamedIntrinsic ni = lookupNamedIntrinsic(method); -#ifdef _TARGET_AMD64_ - // impX86HWIntrinsic :: Only supported for 64-bit - // +#if defined(_TARGET_XARCH_) && !defined(LEGACY_BACKEND) if (ni > NI_HW_INTRINSIC_START && ni < NI_HW_INTRINSIC_END) { retNode = impX86HWIntrinsic(ni, method, sig); @@ -3992,16 +3990,13 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) } } -#ifdef _TARGET_AMD64_ - // lookupHWIntrinsicISA :: Only supported for 64-bit - // +#if defined(_TARGET_XARCH_) && !defined(LEGACY_BACKEND) if ((namespaceName != nullptr) && strcmp(namespaceName, "System.Runtime.Intrinsics.X86") == 0) { InstructionSet isa = lookupHWIntrinsicISA(className); result = lookupHWIntrinsic(methodName, isa); } #endif - return result; }