Branch if Equal Zero
C.BEQZ performs conditional control transfers. The offset is sign-extended and added to the pc to form the branch target address. It can therefore target a ±256 B range. C.BEQZ takes the branch if the value in register xs1' is zero. It expands to `beq` `xs1, x0, offset`.
c.beqz xs1, imm
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11 | 0 | imm | xs1 | imm | 0 | 1 | |||||||||
| Variable | Bits | Width |
|---|---|---|
imm | [12], [6:5], [2], [11:10], [4:3] | 8 |
xs1 | [9:7] | 3 |
if (implemented?(ExtensionName::C) && MISA_CSR_IMPLEMENTED && (CSR[misa].C == 1'b0)) {
reserved_instruction($encoding);
}
if (X[creg2reg(xs1)] == 0) {
jump($pc + $signed(imm));
}
Zca
| S | U | VS | VU |
|---|---|---|---|
| Always | Always | Always | Always |
Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.