From: Mike Danes Date: Tue, 30 Jan 2018 19:45:58 +0000 (+0200) Subject: Use xorps instead of xorpd X-Git-Tag: accepted/tizen/unified/20190422.045933~3079^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce32ae9c6e945e76049c8fbe891fdb8ba9351805;p=platform%2Fupstream%2Fcoreclr.git Use xorps instead of xorpd --- diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index e0046d2..0ae3582 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 32eb482..b1290ea 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.