mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-11-18 22:05:51 +00:00
crnand and crnor fixes
This commit is contained in:
parent
5883524fb8
commit
3258abe190
@ -1270,18 +1270,21 @@ void dppc_interpreter::ppc_creqv() {
|
||||
}
|
||||
void dppc_interpreter::ppc_crnand() {
|
||||
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) {
|
||||
ppc_state.cr &= ~(0x80000000UL >> reg_d);
|
||||
} else {
|
||||
ppc_state.cr |= (0x80000000UL >> reg_d);
|
||||
}
|
||||
}
|
||||
|
||||
void dppc_interpreter::ppc_crnor() {
|
||||
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) {
|
||||
ppc_state.cr &= ~(0x80000000UL >> reg_d);
|
||||
} else {
|
||||
ppc_state.cr |= (0x80000000UL >> reg_d);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user