Webcentive RISC-V Reference

Zicond instructions

Integer Conditional Operations

The "Conditional" operations extension provides a simple solution that provides most of the benefit and all of the flexibility one would desire to support conditional arithmetic and conditional-select/move operations, while remaining true to the RISC-V design philosophy. The instructions follow the format for R-type instructions with 3 operands (i.e., 2 source operands and 1 destination operand).

Using these instructions, branchless sequences can be implemented (typically in two-instruction sequences) without the need for instruction fusion, special provisions during the decoding of architectural instructions, or other microarchitectural provisions.

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zicond.adoc.

Instructions (2)

MnemonicName (riscv-unified-db)XLEN
czero.eqzConditional zero, if condition is equal to zeroRV32 and RV64
czero.nezConditional zero, if condition is nonzeroRV32 and RV64