Atomically read and set bits in a CSR. Reads the value of the CSR, zero-extends the value to `XLEN` bits, and writes it to integer register `xd`. The initial value in integer register `xs1` is treated as a bit mask that specifies bit positions to be set in the CSR. Any bit that is high in `xs1` will cause the corresponding bit to be set in the CSR, if that CSR bit is writable. Other bits in the CSR are not explicitly written.
csrrs xd, csr, xs1
Pseudo-Instructionfrflags xdequalscsrrs xd, 0x001, 0whenxs1 == 0 && csr == 0x001
Pseudo-Instructionfrrm xdequalscsrrs xd, 0x002, 0whenxs1 == 0 && csr == 0x002
Pseudo-Instructionfrcsr xdequalscsrrs xd, 0x003, 0whenxs1 == 0 && csr == 0x003
Pseudo-Instructionrdcycle xdequalscsrrs xd, 0xC00, 0whenxs1 == 0 && csr == 0xC00
Pseudo-Instructionrdtime xdequalscsrrs xd, 0xC01, 0whenxs1 == 0 && csr == 0xC01
Pseudo-Instructionrdinstret xdequalscsrrs xd, 0xC02, 0whenxs1 == 0 && csr == 0xC02
Pseudo-Instructionrdcycleh xdequalscsrrs xd, 0xC80, 0whenxs1 == 0 && csr == 0xC80
Pseudo-Instructionrdtimeh xdequalscsrrs xd, 0xC81, 0whenxs1 == 0 && csr == 0xC81
Pseudo-Instructionrdinstreth xdequalscsrrs xd, 0xC82, 0whenxs1 == 0 && csr == 0xC82
Pseudo-Instructioncsrr xd, csrequalscsrrs xd, csr, 0whenxs1 == 0
Pseudo-Instructioncsrs csr, xs1equalscsrrs 0, csr, xs1whenxd == 0
Type: