mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 21:29:28 +00:00
ppcopcodes: fix cror emulation.
This commit is contained in:
parent
3bdc6f915a
commit
c864b9b7d9
@ -1285,12 +1285,14 @@ void dppc_interpreter::ppc_crnor() {
|
||||
|
||||
void dppc_interpreter::ppc_cror() {
|
||||
ppc_grab_regsdab();
|
||||
if ((ppc_state.cr & (0x80000000UL >> reg_a)) || (ppc_state.cr & (0x80000000UL >> reg_b))) {
|
||||
uint8_t ir = (ppc_state.cr >> (31 - reg_a)) | (ppc_state.cr >> (31 - reg_b));
|
||||
if (ir & 1) {
|
||||
ppc_state.cr |= (0x80000000UL >> reg_d);
|
||||
} else {
|
||||
ppc_state.cr &= ~(0x80000000UL >> reg_d);
|
||||
}
|
||||
}
|
||||
|
||||
void dppc_interpreter::ppc_crorc() {
|
||||
ppc_grab_regsdab();
|
||||
if ((ppc_state.cr & (0x80000000UL >> reg_a)) || !(ppc_state.cr & (0x80000000UL >> reg_b))) {
|
||||
|
Loading…
Reference in New Issue
Block a user