ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

c.beqz

T1 riscv alu insn
Branch if Equal Zero
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zca
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZca

Summary

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.

Syntax / Encoding

c.beqz xs1, imm | 110xxxxxxxxxxx01 (mask=0xe003 match=0xc001)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
16RV110xxxxxxxxxxx010xe003 / 0xc001

Operands

NameDescription
immbits [12,6:5,2,11:10,4:3], sign-extended, shifted << 1
xs1bits [9:7]

Reference Notes

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 &pm;256 B range. C.BEQZ takes the branch if the value in register xs1' is zero.
It expands to `beq` `xs1, x0, offset`.