mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-11-18 22:05:51 +00:00
ppcopcodes: fix creqv emulation.
This commit is contained in:
parent
2442bd17b3
commit
c8d39d5ee5
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user