czero.nez

Conditional zero, if condition is nonzero

If xs2 contains a nonzero value, this instruction writes the value zero to xd. Otherwise, this instruction copies the contents of xs1 to xd. This instruction carries a syntactic dependency from both xs1 and xs2 to xd. Furthermore, if the Zkt extension is implemented, this instruction’s timing is independent of the data values in xs1 and xs2.

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

Assembly format

czero.nez xd, xs1, xs2

Decode Variables

Bits<5> xs2 = $encoding[24:20];
Bits<5> xs1 = $encoding[19:15];
Bits<5> xd = $encoding[11:7];

Execution

X[xd] = (X[xs2] != 0) ? 0 : X[xs1];

Encoding

svg

Defining extension

Access

M

Always

Containing profiles

  • Mandatory: RVA23S64, RVA23U64, RVB23S64, RVB23U64

  • Optional: None