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

Zba

T1 riscv feature feature
Address generation
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon Scopev1.0.0 (ratified)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db

Summary

The Zba instructions can be used to accelerate the generation of addresses that index into arrays of basic types (halfword, word, doubleword) using both unsigned word-sized and XLEN-sized indices: a shifted index is added to a base address.

Syntax / Encoding

Zba v1.0.0 (ratified)

Reference Notes

The Zba instructions can be used to accelerate the generation of addresses that index into
arrays of basic types (halfword, word, doubleword) using both unsigned word-sized and
XLEN-sized indices: a shifted index is added to a base address.

The shift and add instructions do a left shift of 1, 2, or 3 because these are commonly found
in real-world code and because they can be implemented with a minimal amount of additional
hardware beyond that of the simple adder. This avoids lengthening the critical path in
implementations.

While the shift and add instructions are limited to a maximum left shift of 3, the `slli`
instruction (from the base ISA) can be used to perform similar shifts for indexing into arrays
of wider elements. The `slli.uw` -- added in this extension -- can be used when the index is to
be interpreted as an unsigned word.