Refactor the performance counters code so that the operation of reading a performance counter is separate and orthogonal to the CSRRW, CSRRS, and CSRRC instructions.
This cuts down on the code needed, since the CSRRW, CSRRS, and CSRRCinstructions operate the same for all CSR registers, and the RevRegFile handles CSRs with special meanings through its GetCSR() and SetCSR() functions.
Refactor the performance counters code so that the operation of reading a performance counter is separate and orthogonal to the
CSRRW
,CSRRS
, andCSRRC
instructions.This cuts down on the code needed, since the
CSRRW
,CSRRS
, andCSRRC
instructions operate the same for all CSR registers, and theRevRegFile
handles CSRs with special meanings through itsGetCSR()
andSetCSR()
functions.