x86emitter: Fix x64 8-bit rmw codegen

This commit is contained in:
TellowKrinkle 2022-03-10 16:13:01 -06:00 committed by refractionpcsx2
parent fd758bb307
commit 5bdec2f532
2 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,7 @@ namespace x86Emitter
{
if (sibdest.Is8BitOp())
{
xOpWrite(sibdest.GetPrefix16(), 0x80, InstType, sibdest);
xOpWrite(sibdest.GetPrefix16(), 0x80, InstType, sibdest, 1);
xWrite<s8>(imm);
}

View File

@ -113,6 +113,7 @@ TEST(CodegenTests, MathTest)
CODEGEN_TEST_64(xADD(r8, r9), "4d 01 c8");
CODEGEN_TEST_64(xADD(r8, 0x12), "49 83 c0 12");
CODEGEN_TEST_64(xADD(rax, 0x1234), "48 05 34 12 00 00");
CODEGEN_TEST_64(xADD(ptr8[base], 1), "80 05 f9 ff ff ff 01");
CODEGEN_TEST_64(xADD(ptr32[base], -0x60), "83 05 f9 ff ff ff a0");
CODEGEN_TEST_64(xADD(ptr32[base], 0x1234), "81 05 f6 ff ff ff 34 12 00 00");
CODEGEN_TEST_BOTH(xADD(eax, ebx), "01 d8");