yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #1427 from MerryMage/emit-lbit

x64 Emitter: Fix L bit in VEX prefix
This commit is contained in:
Yuri Kunde Schlesner 2016-02-28 03:12:57 -08:00
commit ddcf2ef32a
1 changed files with 2 additions and 2 deletions

View File

@ -225,14 +225,14 @@ void OpArg::WriteVex(XEmitter* emit, X64Reg regOp1, X64Reg regOp2, int L, int pp
// do we need any VEX fields that only appear in the three-byte form? // do we need any VEX fields that only appear in the three-byte form?
if (X == 1 && B == 1 && W == 0 && mmmmm == 1) if (X == 1 && B == 1 && W == 0 && mmmmm == 1)
{ {
u8 RvvvvLpp = (R << 7) | (vvvv << 3) | (L << 1) | pp; u8 RvvvvLpp = (R << 7) | (vvvv << 3) | (L << 2) | pp;
emit->Write8(0xC5); emit->Write8(0xC5);
emit->Write8(RvvvvLpp); emit->Write8(RvvvvLpp);
} }
else else
{ {
u8 RXBmmmmm = (R << 7) | (X << 6) | (B << 5) | mmmmm; u8 RXBmmmmm = (R << 7) | (X << 6) | (B << 5) | mmmmm;
u8 WvvvvLpp = (W << 7) | (vvvv << 3) | (L << 1) | pp; u8 WvvvvLpp = (W << 7) | (vvvv << 3) | (L << 2) | pp;
emit->Write8(0xC4); emit->Write8(0xC4);
emit->Write8(RXBmmmmm); emit->Write8(RXBmmmmm);
emit->Write8(WvvvvLpp); emit->Write8(WvvvvLpp);