BNEZ
Branch if Not Equal to Zero
BNEZ rs, offset
Branches if the register is not zero.
Encoding
Binary Layout
bimm12hi
31:25
00000
24:20
rs1
19:15
001
14:12
bimm12lo
11:7
1100011
6:0
Operands
-
rs
Source -
offset
Label
Example
BNEZ x10, loop
// Jump to loop if x10 is not zero.
Related
More in Pseudo
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
BNEZ branches to the target if rs1 is non-zero. It is a pseudoinstruction for BNE rs1, x0, offset.
Operation
if (R[rs] != 0) PC += offset;