Skip to content

Commit

Permalink
Merge pull request #1417 from o1-labs/feature/mips/sltiu
Browse files Browse the repository at this point in the history
Implement `sltiu`
  • Loading branch information
dannywillems authored Dec 6, 2023
2 parents 5fb2d3b + c1e1059 commit 876f876
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion optimism/src/mips/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,19 @@ pub fn interpret_itype<Env: InterpreterEnv>(env: &mut Env, instr: ITypeInstructi
return;
}
ITypeInstruction::SetLessThanImmediate => (),
ITypeInstruction::SetLessThanImmediateUnsigned => (),
ITypeInstruction::SetLessThanImmediateUnsigned => {
let rs = env.read_register(&rs);
let immediate = env.sign_extend(&immediate, 16);
let res = {
// FIXME: Constrain
let pos = env.alloc_scratch();
unsafe { env.test_less_than(&rs, &immediate, pos) }
};
env.write_register(&rt, res);
env.set_instruction_pointer(next_instruction_pointer.clone());
env.set_next_instruction_pointer(next_instruction_pointer + Env::constant(4u32));
return;
}
ITypeInstruction::AndImmediate => (),
ITypeInstruction::OrImmediate => (),
ITypeInstruction::XorImmediate => {
Expand Down

0 comments on commit 876f876

Please sign in to comment.