mirror of
https://github.com/transistorfet/moa.git
synced 2024-11-21 19:30:52 +00:00
Fixed most DIVU tests, and some more DIVS ones
This commit is contained in:
parent
71c10ff0f0
commit
e3c4ad88ee
@ -470,13 +470,12 @@ impl M68k {
|
||||
};
|
||||
|
||||
// Only update the register if the quotient was large than a 16-bit number
|
||||
if (quotient & 0xFFFF0000) == 0 {
|
||||
if (quotient & 0xFFFF0000) != 0 {
|
||||
self.set_compare_flags(quotient as u32, Size::Word, false, false);
|
||||
self.state.d_reg[dest as usize] = (remainder << 16) | (0xFFFF & quotient);
|
||||
} else {
|
||||
self.set_flag(Flags::Carry, true);
|
||||
self.set_flag(Flags::Carry, false);
|
||||
self.set_flag(Flags::Overflow, true);
|
||||
self.set_flag(Flags::Negative, (quotient as i32) < 0);
|
||||
}
|
||||
},
|
||||
Instruction::DIVL(src, dest_h, dest_l, sign) => {
|
||||
|
Loading…
Reference in New Issue
Block a user