binvi

Single-Bit invert (Immediate)

This instruction is defined by:

Encoding

svg

Synopsis

This instruction returns rs1 with a single bit inverted at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

Access

M

HS

U

VS

VU

Always

Always

Always

Always

Always

Decode Variables

Bits<6> shamt = $encoding[25:20];
Bits<5> rs1 = $encoding[19:15];
Bits<5> rd = $encoding[11:7];
idl

Execution

XReg index = shamt & (63);
X[rd] = X[rs1] ^ (1 << index);
idl