LibJS/JIT: Store the VM register array base in RBX

This allows us to use the displacement-less MOV encoding when accessing
register $0 (the accumulator).

This reduces code size by 158 KiB on Kraken/ai-astar.js :^)
This commit is contained in:
Andreas Kling 2023-10-28 19:25:26 +02:00
commit 9c0c672839
Notes: sideshowbarker 2024-07-16 20:12:13 +09:00

View file

@ -32,7 +32,7 @@ private:
static constexpr auto ARG5 = Assembler::Reg::R9; static constexpr auto ARG5 = Assembler::Reg::R9;
static constexpr auto RET = Assembler::Reg::RAX; static constexpr auto RET = Assembler::Reg::RAX;
static constexpr auto STACK_POINTER = Assembler::Reg::RSP; static constexpr auto STACK_POINTER = Assembler::Reg::RSP;
static constexpr auto REGISTER_ARRAY_BASE = Assembler::Reg::R13; static constexpr auto REGISTER_ARRAY_BASE = Assembler::Reg::RBX;
static constexpr auto LOCALS_ARRAY_BASE = Assembler::Reg::R14; static constexpr auto LOCALS_ARRAY_BASE = Assembler::Reg::R14;
static constexpr auto UNWIND_CONTEXT_BASE = Assembler::Reg::R15; static constexpr auto UNWIND_CONTEXT_BASE = Assembler::Reg::R15;
# endif # endif