mirror of
https://github.com/n64dev/cen64.git
synced 2024-06-22 22:12:45 -04:00
Merge pull request #152 from hcs64/clear-halt-save-pc
Preserve SP PC when clearing halt, don't re-init pipeline if not halted
This commit is contained in:
commit
736220010d
|
@ -101,8 +101,12 @@ void rsp_status_write(struct rsp *rsp, uint32_t rt) {
|
|||
prev_status = rsp->regs[RSP_CP0_REGISTER_SP_STATUS];
|
||||
status = prev_status;
|
||||
|
||||
if (rt & SP_CLR_HALT) {
|
||||
if ((rt & SP_CLR_HALT) && (status & SP_STATUS_HALT)) {
|
||||
// Save PC around pipeline init
|
||||
uint32_t pc = rsp->pipeline.ifrd_latch.pc;
|
||||
rsp_pipeline_init(&rsp->pipeline);
|
||||
rsp->pipeline.ifrd_latch.pc = pc;
|
||||
|
||||
status &= ~SP_STATUS_HALT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue