summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFei Peng <fei.peng@intel.com>2017-10-30 11:32:08 -0700
committerFei Peng <fei.peng@intel.com>2017-10-30 11:32:08 -0700
commit5b2dcd482b3527105d3c5db24141716ff95dd855 (patch)
treee1bdf1c77ace6b2ddb08499c577101601fb5568c /src
parentfb4af6c2908b633b200b556986815781f2139f4e (diff)
downloadcoreclr-5b2dcd482b3527105d3c5db24141716ff95dd855.tar.gz
coreclr-5b2dcd482b3527105d3c5db24141716ff95dd855.tar.bz2
coreclr-5b2dcd482b3527105d3c5db24141716ff95dd855.zip
Rename and simplify SSE3_4 to SSE4
Diffstat (limited to 'src')
-rw-r--r--src/jit/compiler.cpp11
-rw-r--r--src/jit/compiler.h14
-rw-r--r--src/jit/emit.h2
-rw-r--r--src/jit/emitxarch.cpp6
-rw-r--r--src/jit/emitxarch.h10
-rw-r--r--src/jit/simd.cpp4
6 files changed, 24 insertions, 23 deletions
diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp
index 5c20a87e5f..515912c673 100644
--- a/src/jit/compiler.cpp
+++ b/src/jit/compiler.cpp
@@ -2510,12 +2510,13 @@ void Compiler::compSetProcessor()
CLANG_FORMAT_COMMENT_ANCHOR;
#ifdef _TARGET_XARCH_
- opts.compCanUseSSE3_4 = false;
- if (!jitFlags.IsSet(JitFlags::JIT_FLAG_PREJIT) && jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE3_4))
+ opts.compCanUseSSE4 = false;
+ if (!jitFlags.IsSet(JitFlags::JIT_FLAG_PREJIT) && jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE41) &&
+ jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE42))
{
if (JitConfig.EnableSSE3_4() != 0)
{
- opts.compCanUseSSE3_4 = true;
+ opts.compCanUseSSE4 = true;
}
}
@@ -2538,9 +2539,9 @@ void Compiler::compSetProcessor()
codeGen->getEmitter()->SetContainsAVX(false);
codeGen->getEmitter()->SetContains256bitAVX(false);
}
- else if (opts.compCanUseSSE3_4)
+ else if (opts.compCanUseSSE4)
{
- codeGen->getEmitter()->SetUseSSE3_4(true);
+ codeGen->getEmitter()->SetUseSSE4(true);
}
}
#endif // _TARGET_XARCH_
diff --git a/src/jit/compiler.h b/src/jit/compiler.h
index 5eaec8b3ad..e9c87b89df 100644
--- a/src/jit/compiler.h
+++ b/src/jit/compiler.h
@@ -7364,7 +7364,7 @@ private:
return SIMD_AVX2_Supported;
}
- if (CanUseSSE3_4())
+ if (CanUseSSE4())
{
return SIMD_SSE4_Supported;
}
@@ -7851,10 +7851,10 @@ private:
}
// Whether SSE3, SSE3, SSE4.1 and SSE4.2 is available
- bool CanUseSSE3_4() const
+ bool CanUseSSE4() const
{
#ifdef _TARGET_XARCH_
- return opts.compCanUseSSE3_4;
+ return opts.compCanUseSSE4;
#else
return false;
#endif
@@ -7983,10 +7983,10 @@ public:
bool compUseFCOMI;
bool compUseCMOV;
#ifdef _TARGET_XARCH_
- bool compCanUseSSE2; // Allow CodeGen to use "movq XMM" instructions
- bool compCanUseSSE3_4; // Allow CodeGen to use SSE3, SSSE3, SSE4.1 and SSE4.2 instructions
- bool compCanUseAVX; // Allow CodeGen to use AVX 256-bit vectors for SIMD operations
-#endif // _TARGET_XARCH_
+ bool compCanUseSSE2; // Allow CodeGen to use "movq XMM" instructions
+ bool compCanUseSSE4; // Allow CodeGen to use SSE3, SSSE3, SSE4.1 and SSE4.2 instructions
+ bool compCanUseAVX; // Allow CodeGen to use AVX 256-bit vectors for SIMD operations
+#endif // _TARGET_XARCH_
#ifdef _TARGET_XARCH_
uint64_t compSupportsISA;
diff --git a/src/jit/emit.h b/src/jit/emit.h
index c2b5281861..34e87b0204 100644
--- a/src/jit/emit.h
+++ b/src/jit/emit.h
@@ -427,7 +427,7 @@ public:
#endif // DEBUG
#ifdef _TARGET_XARCH_
- SetUseSSE3_4(false);
+ SetUseSSE4(false);
SetUseAVX(false);
#endif // _TARGET_XARCH_
}
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp
index ee0afd0f7f..1f3c91da2d 100644
--- a/src/jit/emitxarch.cpp
+++ b/src/jit/emitxarch.cpp
@@ -136,10 +136,10 @@ bool emitter::Is4ByteAVXInstruction(instruction ins)
bool emitter::Is4ByteSSE4Instruction(instruction ins)
{
#ifdef LEGACY_BACKEND
- // On legacy backend SSE3_4 is not enabled.
+ // On legacy backend SSE4 is not enabled.
return false;
#else
- return UseSSE3_4() && IsSSE4Instruction(ins) && EncodedBySSE38orSSE3A(ins);
+ return UseSSE4() && IsSSE4Instruction(ins) && EncodedBySSE38orSSE3A(ins);
#endif
}
@@ -3813,7 +3813,7 @@ void emitter::emitIns_R_R_I(instruction ins, emitAttr attr, regNumber reg1, regN
// AVX: 3 byte VEX prefix + 1 byte opcode + 1 byte ModR/M + 1 byte immediate
// SSE4: 4 byte opcode + 1 byte ModR/M + 1 byte immediate
// SSE2: 3 byte opcode + 1 byte ModR/M + 1 byte immediate
- sz = (UseAVX() || UseSSE3_4()) ? 6 : 5;
+ sz = (UseAVX() || UseSSE4()) ? 6 : 5;
}
#ifdef _TARGET_AMD64_
diff --git a/src/jit/emitxarch.h b/src/jit/emitxarch.h
index 25053b3e49..f7e1e6bb7f 100644
--- a/src/jit/emitxarch.h
+++ b/src/jit/emitxarch.h
@@ -94,14 +94,14 @@ code_t AddRexXPrefix(instruction ins, code_t code);
code_t AddRexBPrefix(instruction ins, code_t code);
code_t AddRexPrefix(instruction ins, code_t code);
-bool useSSE3_4Encodings;
-bool UseSSE3_4()
+bool useSSE4Encodings;
+bool UseSSE4()
{
- return useSSE3_4Encodings;
+ return useSSE4Encodings;
}
-void SetUseSSE3_4(bool value)
+void SetUseSSE4(bool value)
{
- useSSE3_4Encodings = value;
+ useSSE4Encodings = value;
}
bool EncodedBySSE38orSSE3A(instruction ins);
bool Is4ByteSSE4Instruction(instruction ins);
diff --git a/src/jit/simd.cpp b/src/jit/simd.cpp
index b85d97c1ac..bb33fcd636 100644
--- a/src/jit/simd.cpp
+++ b/src/jit/simd.cpp
@@ -1200,7 +1200,7 @@ GenTreePtr Compiler::impSIMDAbs(CORINFO_CLASS_HANDLE typeHnd, var_types baseType
assert(getSIMDSupportLevel() >= SIMD_SSE4_Supported);
if (baseType == TYP_LONG)
{
- // SSE3_4/AVX2 don't support abs on long type vector.
+ // SSE4/AVX2 don't support abs on long type vector.
useConditionalSelect = true;
}
}
@@ -1410,7 +1410,7 @@ GenTreePtr Compiler::impSIMDMinMax(SIMDIntrinsicID intrinsicId,
// For other integer types we compute min/max as follows
//
// int32/uint32 (SSE2)
- // int64/uint64 (SSE2&SSE3_4):
+ // int64/uint64 (SSE2&SSE4):
// compResult = (op1 < op2) in case of Min
// (op1 > op2) in case of Max
// Min/Max(op1, op2) = Select(compResult, op1, op2)