summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2024-02-15 15:27:44 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2024-02-15 16:38:21 -0800
commit9d81741f27a1d77c5547b4815e4e5b8f5bb5037c (patch)
tree4dc403c4177bdad0354118c95d5d6f13a7ef8d6a /yjit
parentcdc07236a4e79fe0d5473cf984d0ffb3f98b89d7 (diff)
Pop the operand at the end
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/codegen.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 41854b4c58..3873806f77 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -2763,7 +2763,6 @@ fn gen_setinstancevariable(
Opnd::const_ptr(ic as *const u8),
]
);
- asm.stack_pop(1); // Keep it on stack during ccall for GC
} else {
// Get the receiver
let mut recv = asm.load(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_SELF));
@@ -2815,7 +2814,7 @@ fn gen_setinstancevariable(
recv = asm.load(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_SELF))
}
- write_val = asm.stack_pop(1);
+ write_val = asm.stack_opnd(0);
gen_write_iv(asm, comptime_receiver, recv, ivar_index, write_val, needs_extension.is_some());
asm_comment!(asm, "write shape");
@@ -2833,7 +2832,7 @@ fn gen_setinstancevariable(
// the iv index by searching up the shape tree. If we've
// made the transition already, then there's no reason to
// update the shape on the object. Just set the IV.
- write_val = asm.stack_pop(1);
+ write_val = asm.stack_opnd(0);
gen_write_iv(asm, comptime_receiver, recv, ivar_index, write_val, false);
},
}
@@ -2863,6 +2862,7 @@ fn gen_setinstancevariable(
asm.write_label(skip_wb);
}
}
+ asm.stack_pop(1); // Keep it on stack during ccall for GC
Some(KeepCompiling)
}