summaryrefslogtreecommitdiff
path: root/yjit_codegen.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-07-13 16:04:56 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:37 -0400
commit0fdcdd267f7c3a482467f60e00049b88da1ae88c (patch)
tree20925cc78e0562d6c5564b37764ae02efd9c5fc6 /yjit_codegen.c
parentd0174d99c6fcbeae2d5cdaa34908b9ac117bb9c3 (diff)
fix alignment
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r--yjit_codegen.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c
index 25d265432d..0ee795129a 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -238,14 +238,12 @@ yjit_save_regs(codeblock_t* cb)
push(cb, REG_CFP);
push(cb, REG_EC);
push(cb, REG_SP);
- push(cb, REG_SP); // Maintain 16-byte RSP alignment
}
// Restore YJIT registers after a C call
static void
yjit_load_regs(codeblock_t* cb)
{
- pop(cb, REG_SP); // Maintain 16-byte RSP alignment
pop(cb, REG_SP);
pop(cb, REG_EC);
pop(cb, REG_CFP);
@@ -2717,11 +2715,9 @@ gen_send_cfunc(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const
// Pop the C function arguments from the stack (in the caller)
ctx_stack_pop(ctx, argc + 1);
- if (block) {
- // Write interpreter SP into CFP.
- // Needed in case the callee yields to the block.
- jit_save_sp(jit, ctx);
- }
+ // Write interpreter SP into CFP.
+ // Needed in case the callee yields to the block.
+ jit_save_sp(jit, ctx);
// Save YJIT registers
yjit_save_regs(cb);