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
 
Format I-Type
Opcode 0xC0202073
Extension Pseudo

Operands

  • rd
    Destination register (integer)

Example

RDINSTRET x10

// Get instruction count.

Related

More in Pseudo

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];