mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Jit64: Dynamic length of regular jump instruction (for known addresses)
Conditional jumps already do that, so let's be consistent.
This commit is contained in:
@@ -298,12 +298,14 @@ TEST_F(x64EmitterTest, POP_Register)
|
||||
TEST_F(x64EmitterTest, JMP)
|
||||
{
|
||||
emitter->NOP(1);
|
||||
emitter->JMP(code_buffer, XEmitter::Jump::Short);
|
||||
emitter->JMP(code_buffer);
|
||||
ExpectBytes({/* nop */ 0x90, /* short jmp */ 0xeb, /* offset -3 */ 0xfd});
|
||||
|
||||
emitter->NOP(1);
|
||||
emitter->JMP(code_buffer, XEmitter::Jump::Near);
|
||||
ExpectBytes({/* nop */ 0x90, /* near jmp */ 0xe9, /* offset -6 */ 0xfa, 0xff, 0xff, 0xff});
|
||||
emitter->NOP(0x90);
|
||||
const u8* after_nops = emitter->GetCodePtr();
|
||||
ResetCodeBuffer();
|
||||
emitter->JMP(after_nops);
|
||||
ExpectBytes({/* near jmp */ 0xe9, /* offset */ 0x8B, 0, 0, 0});
|
||||
}
|
||||
|
||||
TEST_F(x64EmitterTest, JMPptr_Register)
|
||||
|
||||
Reference in New Issue
Block a user