c.mv

Move Register

This instruction is defined by:

Encoding

svg

Synopsis

C.MV (move register) performs copy of the data in register xs2 to register xd C.MV expands to addi xd, x0, xs2.

Access

M

HS

U

VS

VU

Always

Always

Always

Always

Always

Decode Variables

Bits<5> xd = $encoding[11:7];
Bits<5> xs2 = $encoding[6:2];

Execution

  • Pruned, XLEN == 64

  • Original

if ((%%LINK%csr_field;misa.C;CSR[misa].C%% == 1'b0)) {
  %%LINK%func;raise;raise%%(ExceptionCode::IllegalInstruction, %%LINK%func;mode;mode%%(), $encoding);
}
X[xd] = X[xs2];
if (%%LINK%func;implemented?;implemented?%%(ExtensionName::C) && (%%LINK%csr_field;misa.C;CSR[misa].C%% == 1'b0)) {
  %%LINK%func;raise;raise%%(ExceptionCode::IllegalInstruction, %%LINK%func;mode;mode%%(), $encoding);
}
X[xd] = X[xs2];

Exceptions

This instruction may result in the following synchronous exceptions:

  • IllegalInstruction