mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-08-15 09:27:27 +00:00
ppcopcodes: fix creqv emulation.
This commit is contained in:
@@ -1261,10 +1261,11 @@ void dppc_interpreter::ppc_crandc() {
|
||||
}
|
||||
void dppc_interpreter::ppc_creqv() {
|
||||
ppc_grab_regsdab();
|
||||
if (!((ppc_state.cr & (0x80000000UL >> reg_a)) ^ (ppc_state.cr & (0x80000000UL >> reg_b)))) {
|
||||
ppc_state.cr |= (0x80000000UL >> reg_d);
|
||||
} else {
|
||||
uint8_t ir = (ppc_state.cr >> (31 - reg_a)) ^ (ppc_state.cr >> (31 - reg_b));
|
||||
if (ir & 1) { // compliment is implemented by swapping the following if/else bodies
|
||||
ppc_state.cr &= ~(0x80000000UL >> reg_d);
|
||||
} else {
|
||||
ppc_state.cr |= (0x80000000UL >> reg_d);
|
||||
}
|
||||
}
|
||||
void dppc_interpreter::ppc_crnand() {
|
||||
|
Reference in New Issue
Block a user