diff options
Diffstat (limited to 'riscv/insns/mtpcr.h')
-rw-r--r-- | riscv/insns/mtpcr.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/riscv/insns/mtpcr.h b/riscv/insns/mtpcr.h index 59f864f..f06fcf3 100644 --- a/riscv/insns/mtpcr.h +++ b/riscv/insns/mtpcr.h @@ -15,31 +15,33 @@ switch(insn.rtype.rs2) count = RS1; break; case 5: - cause &= ~(1 << (TIMER_IRQ+CAUSE_IP_SHIFT)); + interrupts_pending &= ~(1 << TIMER_IRQ); compare = RS1; break; - case 7: - sim.send_ipi(RS1); + mmu.set_ptbr(RS1); break; + case 8: + sim.send_ipi(RS1); + break; case 9: - mmu.set_ptbr(RS1); + interrupts_pending &= ~(1 << IPI_IRQ); break; - case 11: - vecbanks = RS1 & 0xff; - vecbanks_count = __builtin_popcountll(vecbanks); + case 12: + pcr_k0 = RS1; + break; + case 13: + pcr_k1 = RS1; break; case 16: sim.set_tohost(RS1); break; - case 24: - pcr_k0 = RS1; - break; - case 25: - pcr_k1 = RS1; + case 18: + vecbanks = RS1 & 0xff; + vecbanks_count = __builtin_popcountll(vecbanks); break; } |