[x64] Fix constant src2 in VECTOR_ROTATE_LEFT_V128.

This commit is contained in:
gibbed 2019-11-30 18:47:32 -06:00 committed by Rick Gibbed
parent f7a8c5ce7a
commit 04a54cc58f
1 changed files with 6 additions and 1 deletions

View File

@ -1252,7 +1252,12 @@ struct VECTOR_ROTATE_LEFT_V128
temp = e.xmm2;
}
// Shift left (to get high bits):
e.vpand(e.xmm0, i.src2, e.GetXmmConstPtr(XMMShiftMaskPS));
if (i.src2.is_constant) {
e.LoadConstantXmm(temp, i.src2.constant());
e.vpand(e.xmm0, temp, e.GetXmmConstPtr(XMMShiftMaskPS));
} else {
e.vpand(e.xmm0, i.src2, e.GetXmmConstPtr(XMMShiftMaskPS));
}
e.vpsllvd(e.xmm1, i.src1, e.xmm0);
// Shift right (to get low bits):
e.vmovaps(temp, e.GetXmmConstPtr(XMMPI32));