1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibJS/JIT: Use mov() helper in Assembler::native_call()

This commit is contained in:
Andreas Kling 2023-10-16 15:36:18 +02:00
parent e7ce3d271a
commit 1e8c6d3b06

View file

@ -396,10 +396,10 @@ struct Assembler {
// align the stack to 16-byte boundary
sub(Operand::Register(Reg::RSP), Operand::Imm8(8));
// load callee into RAX and make indirect call
emit8(0x48);
emit8(0xb8);
emit64((u64)callee);
// load callee into RAX
mov(Operand::Register(Reg::RAX), Operand::Imm64(bit_cast<u64>(callee)));
// call RAX
emit8(0xff);
emit8(0xd0);