summaryrefslogtreecommitdiff
path: root/src/jit/codegenxarch.cpp
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2019-02-21 08:25:52 -0800
committerGitHub <noreply@github.com>2019-02-21 08:25:52 -0800
commitee8a0634d77a502f76d700c3a7eaf7cc59d1ceea (patch)
tree04dc5355397c903de48a3cb4f68018314680aae8 /src/jit/codegenxarch.cpp
parent5ec1eeaa95362be9e76f9f79c9b44162527e95ad (diff)
downloadcoreclr-ee8a0634d77a502f76d700c3a7eaf7cc59d1ceea.tar.gz
coreclr-ee8a0634d77a502f76d700c3a7eaf7cc59d1ceea.tar.bz2
coreclr-ee8a0634d77a502f76d700c3a7eaf7cc59d1ceea.zip
JIT: handle preference miss two register xmm return case (#22733)
Fix a bug in codegen when returning a Vector3 result where the target register is not one of the two return registers. Re-enable the associated test. Closes #22401.
Diffstat (limited to 'src/jit/codegenxarch.cpp')
-rw-r--r--src/jit/codegenxarch.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 6a3228392e..d7b15025a3 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -2053,29 +2053,27 @@ void CodeGen::genMultiRegCallStoreToLocal(GenTree* treeNode)
if (targetReg != reg0 && targetReg != reg1)
{
- // Copy reg0 into targetReg and let it to be handled by one
- // of the cases below.
+ // targetReg = reg0;
+ // targetReg[127:64] = reg1[127:64]
inst_RV_RV(ins_Copy(TYP_DOUBLE), targetReg, reg0, TYP_DOUBLE);
- targetReg = reg0;
+ inst_RV_RV_IV(INS_shufpd, EA_16BYTE, targetReg, reg1, 0x00);
}
-
- if (targetReg == reg0)
+ else if (targetReg == reg0)
{
- // targeReg[63:0] = targetReg[63:0]
+ // (elided) targetReg = reg0
// targetReg[127:64] = reg1[127:64]
inst_RV_RV_IV(INS_shufpd, EA_16BYTE, targetReg, reg1, 0x00);
}
else
{
assert(targetReg == reg1);
-
// We need two shuffles to achieve this
// First:
- // targeReg[63:0] = targetReg[63:0]
+ // targetReg[63:0] = targetReg[63:0]
// targetReg[127:64] = reg0[63:0]
//
// Second:
- // targeReg[63:0] = targetReg[127:64]
+ // targetReg[63:0] = targetReg[127:64]
// targetReg[127:64] = targetReg[63:0]
//
// Essentially copy low 8-bytes from reg0 to high 8-bytes of targetReg