Implement ConvertIntToChar
This commit is contained in:
parent
95beeef1c5
commit
202d7692bc
2 changed files with 9 additions and 0 deletions
|
@ -914,6 +914,13 @@ impl JVM {
|
|||
wrap_stackframe_error(class, method, frame.operand_stack.push(StackValue::Int(comparison_result)))?;
|
||||
}
|
||||
|
||||
Instruction::ConvertIntToChar() => {
|
||||
let int_value = wrap_stackframe_error(class, method, frame.operand_stack.pop_int(0))?;
|
||||
let char_value = int_value & 0x0000FFFF;
|
||||
|
||||
frame.operand_stack.push(StackValue::Int(char_value)).unwrap();
|
||||
}
|
||||
|
||||
Instruction::DivideInt() => {
|
||||
// TODO: Obey all the rules
|
||||
let quotient = wrap_stackframe_error(class, method, frame.operand_stack.pop_int(0))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue