c.andi

And immediate

This instruction is defined by:

Encoding

svg

Synopsis

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

Access

M

HS

U

VS

VU

Always

Always

Always

Always

Always

Decode Variables

Bits<6> imm = {$encoding[12], $encoding[6:2]};
Bits<3> rd = $encoding[9:7];

Execution

  • Pruned, XLEN == 64

  • Original

X[rd + 8] = X[rd + 8] & imm;
X[rd + 8] = X[rd + 8] & imm;