c.not

Bitwise not, 16-bit encoding

This instruction is defined by:

  • anyOf:

    • Zcb, version >= 0

    • Zce, version >= 0

This instruction is included in the following profiles:

Encoding

svg

Assembly format

c.not rd

Synopsis

This instruction takes a single source/destination operand. This instruction takes the one’s complement of rd'/rs1' and writes the result to the same register.

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

Bits<3> rd = $encoding[9:7];

Execution

  • IDL

  • Sail

if (implemented?(ExtensionName::C) && (CSR[misa].C == 1'b0)) {
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
X[rd + 8] = ~X[rd + 8];
{
  X(rsdc) = X(rsdc) XOR -1;
  RETIRE_SUCCESS
}

Exceptions

This instruction may result in the following synchronous exceptions:

  • IllegalInstruction