Atomically write CSR using a 5-bit immediate, and load the previous value into 'xd'. Read the old value of the CSR, zero-extends the value to `XLEN` bits, and then write it to integer register xd. The 5-bit uimm field is zero-extended and written to the CSR. If `xd=x0`, then the instruction shall not read the CSR and shall not cause any of the side effects that might occur on a CSR read.
csrrwi xd, csr, imm
Type: