riscv-fast-interrupt icon indicating copy to clipboard operation
riscv-fast-interrupt copied to clipboard

xnxti side-effect question

Open dansmathers opened this issue 2 years ago • 2 comments

posted to fast-int message board: https://lists.riscv.org/g/tech-fast-int/message/437

Section 5.8. xnxti pseudo-code When (uimm [4: 0]! = 0), the side-effect is to be executed. This pseudo-code requires updating mstatus to perform the side-effect. I want how to do a side-effect without updating mststaus.

dansmathers avatar Mar 01 '22 17:03 dansmathers

related to #100, #211?

dansmathers avatar Apr 26 '22 21:04 dansmathers

Can you give a use case for this new feature (updating other CSRs without updating mstatus)?

kasanovic avatar Jun 21 '22 16:06 kasanovic

Note that csrrsi or csrrci can be used with xnxti.
if mstatus.mie is already 0 and you don't want to update mstatus, csrci t0, mnxti, MIE if mstatus.mie is already 1 and you don't want to update mstatus, csrsi t0, mnxti, MIE

So it is possible to effectively not update mstatus while causing the side-effects.

dansmathers avatar Nov 08 '22 18:11 dansmathers