mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Make lir::Opnd::const_ptr take any pointer to save on casts
This commit is contained in:
parent
7a7f128d0d
commit
3922a14a22
2 changed files with 4 additions and 4 deletions
|
@ -416,7 +416,7 @@ fn gen_get_constant_path(asm: &mut Assembler, ic: *const iseq_inline_constant_ca
|
|||
// Save PC since the call can allocate an IC
|
||||
gen_save_pc(asm, state);
|
||||
|
||||
asm_ccall!(asm, rb_vm_opt_getconstant_path, EC, CFP, Opnd::const_ptr(ic as *const u8))
|
||||
asm_ccall!(asm, rb_vm_opt_getconstant_path, EC, CFP, Opnd::const_ptr(ic))
|
||||
}
|
||||
|
||||
fn gen_invokebuiltin(asm: &mut Assembler, state: &FrameState, bf: &rb_builtin_function, args: Vec<Opnd>) -> Option<lir::Opnd> {
|
||||
|
@ -988,7 +988,7 @@ fn gen_save_pc(asm: &mut Assembler, state: &FrameState) {
|
|||
let next_pc: *const VALUE = unsafe { state.pc.offset(insn_len(opcode) as isize) };
|
||||
|
||||
asm_comment!(asm, "save PC to CFP");
|
||||
asm.mov(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), Opnd::const_ptr(next_pc as *const u8));
|
||||
asm.mov(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), Opnd::const_ptr(next_pc));
|
||||
}
|
||||
|
||||
/// Save the current SP on the CFP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue