Skip to content

Commit

Permalink
move position of less than variable into local scope
Browse files Browse the repository at this point in the history
  • Loading branch information
svv232 committed Dec 23, 2024
1 parent 0b721aa commit 76ba34a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions o1vm/src/interpreters/riscv32im/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2239,10 +2239,10 @@ pub fn interpret_sbtype<Env: InterpreterEnv>(env: &mut Env, instr: SBInstruction
let local_rs1 = env.read_register(&rs1);
let local_rs2 = env.read_register(&rs2);

let rd_scratch = env.alloc_scratch();

let less_than =
unsafe { env.test_less_than_signed(&local_rs1, &local_rs2, rd_scratch) };
let less_than = {
let rd_scratch = env.alloc_scratch();
unsafe { env.test_less_than_signed(&local_rs1, &local_rs2, rd_scratch) }
};

let offset =
less_than.clone() * Env::constant(4) + (Env::constant(1) - less_than) * imm0_12;
Expand Down

0 comments on commit 76ba34a

Please sign in to comment.