RDINSTRET
Read Instructions Retired
RDINSTRET rd
Reads the count of instructions retired (completed).
Encoding
Binary Layout
11000000001000000010
31:12
rd
11:7
1110011
6:0
Operands
-
rd
Destination register (integer)
Example
RDINSTRET x10
// Get instruction count.
Related
More in Pseudo
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
RDINSTRET reads the instret CSR, which counts the number of instructions retired by the processor. It is an assembler pseudoinstruction for CSRRS rd, instret, x0.
Operation
R[rd] = CSR[instret];