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

LibJS/JIT: Add fast path for cached GetVariable accesses

We can now stay in machine code for environment variable read accesses
as long as they are cached and initialized.

20% speed-up on Octane/zlib.js :^)
This commit is contained in:
Andreas Kling 2023-11-06 15:23:49 +01:00
parent 7826c006c1
commit 1d8ec677a3
6 changed files with 147 additions and 3 deletions

View file

@ -27,6 +27,7 @@ private:
# if ARCH(X86_64)
static constexpr auto GPR0 = Assembler::Reg::RAX;
static constexpr auto GPR1 = Assembler::Reg::RCX;
static constexpr auto GPR2 = Assembler::Reg::R12;
static constexpr auto ARG0 = Assembler::Reg::RDI;
static constexpr auto ARG1 = Assembler::Reg::RSI;
static constexpr auto ARG2 = Assembler::Reg::RDX;