c.not

Bitwise not, 16-bit encoding

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

This instruction must have data-independent timing when extension Zkt is enabled.

Assembly format

c.not xd

Decode Variables

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

Execution

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

Exceptions

This instruction may result in the following synchronous exceptions:

  • IllegalInstruction

Encoding

svg

Defining extension

Zcb

Access

M

Always

Containing profiles

  • Mandatory: RVA23S64, RVA23U64, RVB23S64, RVB23U64

  • Optional: RVA20S64, RVA20U64, RVA22S64, RVA22U64, RVA23S64, RVA23U64, RVB23S64, RVB23U64, RVI20U32, RVI20U64