c.mv
Move Register
This instruction is defined by:
-
anyOf:
-
C, version >= 0
-
Zca, version >= 0
-
This instruction is included in the following profiles:
Synopsis
C.MV (move register) performs copy of the data in register rs2 to register rd C.MV expands to addi rd, x0, rs2.
Execution
-
IDL
-
Sail
if (implemented?(ExtensionName::C) && (CSR[misa].C == 1'b0)) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
X[rd] = X[rs2];
{
let rs2_val = X(rs2);
X(rs) = rs2_val
RETIRE_SUCCESS
}