ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

Zibi

T1 riscv feature feature
Branch with Immediate
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon Scopev0.7.0 (frozen)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Note: Extension state: frozen

Summary

The Zibi extension adds conditional branch instructions that compare an integer register with a small immediate constant.

Syntax / Encoding

Zibi v0.7.0 (frozen)

Reference Notes

The Zibi extension adds conditional branch instructions that compare an
integer register with a small immediate constant.

Existing conditional branch instructions, such as `beq` and `bne`, compare two
integer registers. When a branch compares against a constant, software must
otherwise materialize that constant in an integer register before branching,
which can increase register pressure and potentially cause register spills and
reloads.

The `beqi` and `bnei` instructions use the B-type instruction format. The
instruction bits that would otherwise carry _rs2_ in a B-type branch carry a
5-bit _cimm_ field. All _cimm_ encodings are valid: the _cimm_ field is not
sign-extended; it decodes to an XLEN-bit comparison constant where `cimm=0`
encodes the value -1, and `cimm` values 1 through 31 encode the corresponding
positive integer values 1 through 31.