summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2018-02-05 10:00:36 -0800
committerGitHub <noreply@github.com>2018-02-05 10:00:36 -0800
commit2c251d4d992108049adeb9a6112768b095e4e127 (patch)
tree8be08ca224860e1b19c6167d68b7e5b5c5372e00 /src
parent659e8dd7765511121a2b02bfa60d63f2526e5c1f (diff)
parentce32ae9c6e945e76049c8fbe891fdb8ba9351805 (diff)
downloadcoreclr-2c251d4d992108049adeb9a6112768b095e4e127.tar.gz
coreclr-2c251d4d992108049adeb9a6112768b095e4e127.tar.bz2
coreclr-2c251d4d992108049adeb9a6112768b095e4e127.zip
Merge pull request #16103 from mikedn/xorps
Use xorps instead of xorpd
Diffstat (limited to 'src')
-rw-r--r--src/jit/codegencommon.cpp13
-rw-r--r--src/jit/codegenxarch.cpp2
2 files changed, 5 insertions, 10 deletions
diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp
index 4c0fce504c..0ffad31101 100644
--- a/src/jit/codegencommon.cpp
+++ b/src/jit/codegencommon.cpp
@@ -6722,11 +6722,8 @@ void CodeGen::genZeroInitFltRegs(const regMaskTP& initFltRegs, const regMaskTP&
inst_RV_RV(INS_vmov_i2f, reg, initReg, TYP_FLOAT, EA_4BYTE);
}
#elif defined(_TARGET_XARCH_)
- // Xorpd xmmreg, xmmreg is the fastest way to initialize a float register to
- // zero instead of moving constant 0.0f. Though we just need to initialize just the 32-bits
- // we will use xorpd to initialize 64-bits of the xmm register so that it can be
- // used to zero initialize xmm registers that hold double values.
- inst_RV_RV(INS_xorpd, reg, reg, TYP_DOUBLE);
+ // XORPS is the fastest and smallest way to initialize a XMM register to zero.
+ inst_RV_RV(INS_xorps, reg, reg, TYP_DOUBLE);
dblInitReg = reg;
#elif defined(_TARGET_ARM64_)
NYI("Initialize floating-point register to zero");
@@ -6759,10 +6756,8 @@ void CodeGen::genZeroInitFltRegs(const regMaskTP& initFltRegs, const regMaskTP&
inst_RV_RV_RV(INS_vmov_i2d, reg, initReg, initReg, EA_8BYTE);
}
#elif defined(_TARGET_XARCH_)
- // Xorpd xmmreg, xmmreg is the fastest way to initialize a double register to
- // zero than moving constant 0.0d. We can also use lower 32-bits of 'reg'
- // for zero initializing xmm registers subsequently that contain float values.
- inst_RV_RV(INS_xorpd, reg, reg, TYP_DOUBLE);
+ // XORPS is the fastest and smallest way to initialize a XMM register to zero.
+ inst_RV_RV(INS_xorps, reg, reg, TYP_DOUBLE);
fltInitReg = reg;
#elif defined(_TARGET_ARM64_)
// We will just zero out the entire vector register. This sets it to a double zero value
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 5726f2af88..456cfb9b30 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -2787,7 +2787,7 @@ void CodeGen::genCodeForInitBlkUnroll(GenTreeBlk* initBlkNode)
}
else
{
- emit->emitIns_R_R(INS_xorpd, EA_8BYTE, tmpReg, tmpReg);
+ emit->emitIns_R_R(INS_xorps, EA_8BYTE, tmpReg, tmpReg);
}
// Determine how many 16 byte slots we're going to fill using SSE movs.