Closed dansmathers closed 1 year ago
The new form should not copy register source [4:0] into low bits of mstatus - we need to set the interrupt enable bit. Could use a csrrs instruction that checks level field in source register and always only sets the interrupt enable bit. This is slightly unusual csr instruction, but does not take any more encoding space as it was one of the previously unused forms of accessing the mnxti CSR.
closing. replaced by pull #344
for issue #308, allows setting mcause.mpil (used by xnxti to filter interrupts) as atomic with xnxti write.