summaryrefslogtreecommitdiff
path: root/yjit_core.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-08-04 16:17:36 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:39 -0400
commit8fa0ee4d404f7cc9ff64f8bafcd53f43aed64914 (patch)
tree6f158562a320a3ff069234bf6ebe4e3a64d21ea9 /yjit_core.c
parented8aa3409a606a1c254eb94f7446827a11c66df2 (diff)
Use callee-saved regs for REG_SP, REG_EP, REG_CFP
Diffstat (limited to 'yjit_core.c')
-rw-r--r--yjit_core.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/yjit_core.c b/yjit_core.c
index 5389f3af5f..519da41230 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -847,22 +847,12 @@ uint8_t* get_branch_target(
// Generate an outlined stub that will call branch_stub_hit()
uint8_t* stub_addr = cb_get_ptr(ocb, ocb->write_pos);
- // Save the yjit registers
- push(ocb, REG_CFP);
- push(ocb, REG_EC);
- push(ocb, REG_SP);
-
// Call branch_stub_hit(branch_idx, target_idx, ec)
mov(ocb, C_ARG_REGS[2], REG_EC);
mov(ocb, C_ARG_REGS[1], imm_opnd(target_idx));
mov(ocb, C_ARG_REGS[0], const_ptr_opnd(branch));
call_ptr(ocb, REG0, (void *)&branch_stub_hit);
- // Restore the yjit registers
- pop(ocb, REG_SP);
- pop(ocb, REG_EC);
- pop(ocb, REG_CFP);
-
// Jump to the address returned by the
// branch_stub_hit call
jmp_rm(ocb, RAX);