1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

LibJS/JIT: Do "enter & leave" sequence in x86_64 machine code

This ensures that the stack pointer is restored before we return from
the jitted code.
This commit is contained in:
Andreas Kling 2023-10-17 18:03:39 +02:00
parent 814b07a9c2
commit 71e41418f6
2 changed files with 12 additions and 0 deletions

View file

@ -179,6 +179,8 @@ OwnPtr<NativeExecutable> Compiler::compile(Bytecode::Executable const& bytecode_
Compiler compiler;
compiler.m_assembler.enter();
compiler.m_assembler.mov(
Assembler::Operand::Register(REGISTER_ARRAY_BASE),
Assembler::Operand::Register(ARG1));