c.andi

And immediate

This instruction is defined by:

Encoding

svg

Synopsis

And an immediate to the value in xd, and store the result in xd. The xd register index should be used as xd+8 (registers x8-x15). C.ANDI expands into andi xd, xd, imm.

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

signed Bits<6> imm = sext({$encoding[12], $encoding[6:2]}, 6);
Bits<3> xd = $encoding[9:7];

Execution

  • Pruned, XLEN == 64

  • Original

X[creg2reg(xd)] = X[creg2reg(xd)] & $signed(imm);
X[creg2reg(xd)] = X[creg2reg(xd)] & $signed(imm);