CSR Clear and Set Bits Instructions

Christmas @risc_v Tip:

The Zicsr extension defines instructions for clearing and setting CSR bits, which are abstracted by the pseudoinstructions csrc and csrs. Example tandem usage below with bit masks (t0 / t1) to set “Machine Previous Privilege” (mstatus[12:11]):

21-12-25

Original Tweet