wasm_interp: implement i32.lt_s

This commit is contained in:
Brian Carroll 2022-11-26 10:12:47 +00:00
parent 82e8c89045
commit c55cedd279
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 46 additions and 3 deletions

View file

@ -574,7 +574,12 @@ impl<'a> ExecutionState<'a> {
I32EQZ => todo!("{:?} @ {:#x}", op_code, file_offset),
I32EQ => todo!("{:?} @ {:#x}", op_code, file_offset),
I32NE => todo!("{:?} @ {:#x}", op_code, file_offset),
I32LTS => todo!("{:?} @ {:#x}", op_code, file_offset),
I32LTS => {
let second = self.value_stack.pop_i32();
let first = self.value_stack.pop_i32();
let result: bool = first < second;
self.value_stack.push(Value::I32(result as i32));
}
I32LTU => todo!("{:?} @ {:#x}", op_code, file_offset),
I32GTS => todo!("{:?} @ {:#x}", op_code, file_offset),
I32GTU => todo!("{:?} @ {:#x}", op_code, file_offset),