From 995afe957ad9cff54da0b8bdb76f04c676b13db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Wed, 25 Sep 2024 19:51:19 +0200 Subject: [PATCH] Replace usage of REGISTER_OTHER_SCRATCH with REGISTER_SCRATCH and stack_slot_of_value_to_store. --- src/jit.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jit.rs b/src/jit.rs index 7a525aaf4..6fa0d725d 100644 --- a/src/jit.rs +++ b/src/jit.rs @@ -1086,18 +1086,18 @@ impl<'a, C: ContextObject> JitCompiler<'a, C> { let stack_slot_of_value_to_store = X86IndirectAccess::OffsetIndexShift(-112, RSP, 0); match value { Some(Value::Register(reg)) => { - self.emit_ins(X86Instruction::mov(OperandSize::S64, reg, REGISTER_OTHER_SCRATCH)); + self.emit_ins(X86Instruction::store(OperandSize::S64, reg, RSP, stack_slot_of_value_to_store)); } Some(Value::Constant64(constant, user_provided)) => { if user_provided && self.should_sanitize_constant(constant) { - self.emit_sanitized_load_immediate(OperandSize::S64, REGISTER_OTHER_SCRATCH, constant); + self.emit_sanitized_load_immediate(OperandSize::S64, REGISTER_SCRATCH, constant); } else { - self.emit_ins(X86Instruction::load_immediate(OperandSize::S64, REGISTER_OTHER_SCRATCH, constant)); + self.emit_ins(X86Instruction::load_immediate(OperandSize::S64, REGISTER_SCRATCH, constant)); } + self.emit_ins(X86Instruction::store(OperandSize::S64, REGISTER_SCRATCH, RSP, stack_slot_of_value_to_store)); } _ => {} } - self.emit_ins(X86Instruction::store(OperandSize::S64, REGISTER_OTHER_SCRATCH, RSP, stack_slot_of_value_to_store)); match vm_addr { Value::RegisterPlusConstant64(reg, constant, user_provided) => {