Merge branch 'master' into d3d12

This commit is contained in:
Triang3l 2018-11-18 17:17:45 +03:00
commit 0c1431df46
1 changed files with 9 additions and 9 deletions

View File

@ -5621,6 +5621,14 @@ struct VECTOR_SHL_V128
return _mm_load_si128(reinterpret_cast<__m128i*>(value)); return _mm_load_si128(reinterpret_cast<__m128i*>(value));
} }
static void EmitInt16(X64Emitter& e, const EmitArgType& i) { static void EmitInt16(X64Emitter& e, const EmitArgType& i) {
Xmm src1;
if (i.src1.is_constant) {
src1 = e.xmm2;
e.LoadConstantXmm(src1, i.src1.constant());
} else {
src1 = i.src1;
}
if (i.src2.is_constant) { if (i.src2.is_constant) {
const auto& shamt = i.src2.constant(); const auto& shamt = i.src2.constant();
bool all_same = true; bool all_same = true;
@ -5632,7 +5640,7 @@ struct VECTOR_SHL_V128
} }
if (all_same) { if (all_same) {
// Every count is the same, so we can use vpsllw. // Every count is the same, so we can use vpsllw.
e.vpsllw(i.dest, i.src1, shamt.u16[0] & 0xF); e.vpsllw(i.dest, src1, shamt.u16[0] & 0xF);
return; return;
} }
} }
@ -5640,14 +5648,6 @@ struct VECTOR_SHL_V128
// Shift 8 words in src1 by amount specified in src2. // Shift 8 words in src1 by amount specified in src2.
Xbyak::Label emu, end; Xbyak::Label emu, end;
Xmm src1;
if (i.src1.is_constant) {
src1 = e.xmm2;
e.LoadConstantXmm(src1, i.src1.constant());
} else {
src1 = i.src1;
}
// Only bother with this check if shift amt isn't constant. // Only bother with this check if shift amt isn't constant.
if (!i.src2.is_constant) { if (!i.src2.is_constant) {
// See if the shift is equal first for a shortcut. // See if the shift is equal first for a shortcut.