Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Fix lack of sign extend for MUL
Browse files Browse the repository at this point in the history
This FINALLY fixes Vertical Force :D
  • Loading branch information
yupferris committed Feb 13, 2017
1 parent 34f11cd commit 09cb078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rustual-boy-core/src/v810.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ impl V810 {
self.set_reg_gpr(reg2, res);
}),
OPCODE_BITS_MUL => format_i!(|reg1, reg2| {
let lhs = self.reg_gpr(reg2) as i64;
let rhs = self.reg_gpr(reg1) as i64;
let lhs = (self.reg_gpr(reg2) as i32) as i64;
let rhs = (self.reg_gpr(reg1) as i32) as i64;
let res = (lhs * rhs) as u64;
let res_low = res as u32;
let res_high = (res >> 32) as u32;
Expand Down

0 comments on commit 09cb078

Please sign in to comment.