C.BNEZ
Compressed Branch if Not Equal to Zero
C.BNEZ rs1', offset
Branches if the register is not zero.
Encoding
Binary Layout
?
31:16
111
15:13
c_bimm9hi
12:10
rs1_p
9:7
c_bimm9lo
6:2
01
1:0
Operands
-
rs1'
Source -
offset
Target
Example
C.BNEZ x8, loop
// Jump if x8 is not 0.
Related
More in C
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Branches to an 8-bit PC-relative offset if rs1′ is non-zero.
Operation
if (R[rs1'] != 0) PC += sext(offset);