This function is being called in the main op after all input regs were read and before it writes into any regs. This way we can always use bitwise or to apply the ext command output, because if the main op didn't change the value then 0 | ext output = ext output and if it did then bitwise or is still the right thing to do Only needed for cases when mainop and extended are modifying the same ACC Ga
| 534 | // Only needed for cases when mainop and extended are modifying the same ACC |
| 535 | // Games are not doing that + in motorola (similar DSP) dox this is forbidden to do. |
| 536 | void zeroWriteBackLog() |
| 537 | { |
| 538 | #ifdef PRECISE_BACKLOG |
| 539 | // always make sure to have an extra entry at the end w/ -1 to avoid |
| 540 | // infinitive loops |
| 541 | for (int i = 0; writeBackLogIdx[i] != -1; i++) |
| 542 | { |
| 543 | dsp_op_write_reg(writeBackLogIdx[i], 0); |
| 544 | } |
| 545 | #endif |
| 546 | } |
| 547 | |
| 548 | void zeroWriteBackLogPreserveAcc(u8 acc) |
| 549 | { |
no test coverage detected