Fixing vspltw and vrlimi.

This commit is contained in:
Ben Vanik 2013-10-03 20:19:11 -07:00
parent bdb5b0eae2
commit 611902a97e
2 changed files with 7 additions and 9 deletions

View File

@ -1882,9 +1882,9 @@ XEDISASMR(vspltisw128, VX128_3(6, 1904), VX128_3)(InstrData& i, InstrDisasm&
XEDISASMR(vspltw, 0x1000028C, VX )(InstrData& i, InstrDisasm& d) {
d.Init("vspltw", "Vector Splat Word",
InstrDisasm::kVMX);
//d.AddRegOperand(InstrRegister::kVMX, i.VX.VD, InstrRegister::kWrite);
//d.AddRegOperand(InstrRegister::kVMX, i.VX.VA, InstrRegister::kRead);
//d.AddRegOperand(InstrRegister::kVMX, i.VX.VB, InstrRegister::kRead);
d.AddRegOperand(InstrRegister::kVMX, i.VX.VD, InstrRegister::kWrite);
d.AddRegOperand(InstrRegister::kVMX, i.VX.VB, InstrRegister::kRead);
d.AddUImmOperand(i.VX.VA, 1);
return d.Finish();
}

View File

@ -1251,19 +1251,17 @@ XEEMITTER(vrlimi128, VX128_4(6, 1808), VX128_4)(X64Emitter& e, X86Compiler&
switch (y) {
case 1:
// X Y Z W -> Y Z W X
c.shufps(v, v, imm(0x6C));
c.shufps(v, v, imm(0x39));
break;
case 2:
// X Y Z W -> Z W X Y
c.shufps(v, v, imm(0xB1));
c.shufps(v, v, imm(0x4E));
break;
case 3:
// X Y Z W -> W X Y Z
c.shufps(v, v, imm(0xC6));
c.shufps(v, v, imm(0x93));
break;
default:
XEASSERTALWAYS();
return 1;
default: XEASSERTALWAYS(); return 1;
}
}
uint32_t blend_mask =