Assembly:

RDPGPR rt, rs

nanoMIPS. Requires CP0 privilege.

Read Previous GPR

Purpose:

Read Previous GPR. Write the value of register $rs from the previous shadow register set(SRSCtl.PSS) to register $rt in the current shadow register set (SRSCtl.CSS). If shadow register sets are not implemented,just copy the value from register $rs to register $rt.

Availability:

nanoMIPS. Requires CP0 privilege.

Format:

001000

rt

rs

11

10000

101

111

111

6

5

5

2

5

3

3

3

Operation:

if not IsCoprocessor0Enabled():
    raise coprocessor_exception(0)
if C0.SRSCtl.HSS > 0:
    GPR[rt] = SRS[C0.SRSCtl.PSS][rs]
else:
    GPR[rt] = GPR[rs]

Exceptions:

Coprocessor Unusable.