Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 1.66 KB

zba.adoc

File metadata and controls

71 lines (53 loc) · 1.66 KB

Zba extension

Frozen

The Zba extension is frozen.

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.

The following instructions (and pseudoinstructions) comprise the Zba extension:

RV32 RV64 Mnemonic Instruction

add.uw rd, rs1, rs2

[insns-add_uw]

sh1add rd, rs1, rs2

[insns-sh1add]

sh1add.uw rd, rs1, rs2

[insns-sh1add_uw]

sh2add rd, rs1, rs2

[insns-sh2add]

sh2add.uw rd, rs1, rs2

[insns-sh2add_uw]

sh3add rd, rs1, rs2

[insns-sh3add]

sh3add.uw rd, rs1, rs2

[insns-sh3add_uw]

slli.uw rd, rs1, imm

[insns-slli_uw]

zext.w rd, rs

[insns-add_uw]