mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
X64EmitterTest: Check bytes instead of disassembly in JMP test
Check bytes directly to avoid ambiguity in the disassembly between short and near jumps, which could hypothetically cause the test to pass when it shouldn't.
This commit is contained in:
@ -297,15 +297,13 @@ TEST_F(x64EmitterTest, POP_Register)
|
||||
|
||||
TEST_F(x64EmitterTest, JMP)
|
||||
{
|
||||
emitter->NOP(6);
|
||||
emitter->JMP(code_buffer);
|
||||
ExpectDisassembly("multibyte nop "
|
||||
"jmp .-8");
|
||||
emitter->NOP(1);
|
||||
emitter->JMP(code_buffer, XEmitter::Jump::Short);
|
||||
ExpectBytes({/* nop */ 0x90, /* short jmp */ 0xeb, /* offset -3 */ 0xfd});
|
||||
|
||||
emitter->NOP(6);
|
||||
emitter->NOP(1);
|
||||
emitter->JMP(code_buffer, XEmitter::Jump::Near);
|
||||
ExpectDisassembly("multibyte nop "
|
||||
"jmp .-11");
|
||||
ExpectBytes({/* nop */ 0x90, /* near jmp */ 0xe9, /* offset -6 */ 0xfa, 0xff, 0xff, 0xff});
|
||||
}
|
||||
|
||||
TEST_F(x64EmitterTest, JMPptr_Register)
|
||||
|
Reference in New Issue
Block a user