RISC-V ISA Explorer · Single-Letter Extensions

B: Bit-Manip Bundle

Ratified 2024-04 · version 1.0.0

Umbrella for the Zba, Zbb and Zbs bit-manipulation extensions, signaled to software by a single misa bit.

Typical use: Aggregates Zba/Zbb/Zbs

Specification

Open B in the explorer

Dependencies

Requires

Members

Instructions (41)

MnemonicNameEncodingMatchMask
ADD.UWAdd unsigned word0000100----------000-----01110110x800003b0xfe00707f
ANDNAND with inverted operand0100000----------111-----01100110x400070330xfe00707f
BCLRSingle-Bit clear (Register)0100100----------001-----01100110x480010330xfe00707f
BCLRISingle-Bit clear (Immediate)010010-----------001-----00100110x480010130xfc00707f
BEXTSingle-Bit extract (Register)0100100----------101-----01100110x480050330xfe00707f
BEXTISingle-Bit extract (Immediate)010010-----------101-----00100110x480050130xfc00707f
BINVSingle-Bit invert (Register)0110100----------001-----01100110x680010330xfe00707f
BINVISingle-Bit invert (Immediate)011010-----------001-----00100110x680010130xfc00707f
BSETSingle-Bit set (Register)0010100----------001-----01100110x280010330xfe00707f
BSETISingle-Bit set (Immediate)001010-----------001-----00100110x280010130xfc00707f
CLZCount leading zero bits011000000000-----001-----00100110x600010130xfff0707f
CLZWCount leading zero bits in word011000000000-----001-----00110110x6000101b0xfff0707f
CPOPCount set bits011000000010-----001-----00100110x602010130xfff0707f
CPOPWCount set bits in word011000000010-----001-----00110110x6020101b0xfff0707f
CTZCount trailing zero bits011000000001-----001-----00100110x601010130xfff0707f
CTZWCount trailing zero bits in word011000000001-----001-----00110110x6010101b0xfff0707f
MAXMaximum0000101----------110-----01100110xa0060330xfe00707f
MAXUUnsigned maximum0000101----------111-----01100110xa0070330xfe00707f
MINMinimum0000101----------100-----01100110xa0040330xfe00707f
MINUUnsigned minimum0000101----------101-----01100110xa0050330xfe00707f
ORC.BBitware OR-combine, byte granule001010000111-----101-----00100110x287050130xfff0707f
ORNOR with inverted operand0100000----------110-----01100110x400060330xfe00707f
REV8Byte-reverse register (RV64 encoding)011010111000-----101-----00100110x6b8050130xfff0707f
ROLRotate left (Register)0110000----------001-----01100110x600010330xfe00707f
ROLWRotate left word (Register)0110000----------001-----01110110x6000103b0xfe00707f
RORRotate right (Register)0110000----------101-----01100110x600050330xfe00707f
RORIRotate right (Immediate)011000-----------101-----00100110x600050130xfc00707f
RORIWRotate right word (Immediate)0110000----------101-----00110110x6000501b0xfe00707f
RORWRotate right word (Register)0110000----------101-----01110110x6000503b0xfe00707f
SEXT.BSign-extend byte011000000100-----001-----00100110x604010130xfff0707f
SEXT.HSign-extend halfword011000000101-----001-----00100110x605010130xfff0707f
SH1ADDShift left by 1 and add0010000----------010-----01100110x200020330xfe00707f
SH1ADD.UWShift unsigned word left by 1 and add0010000----------010-----01110110x2000203b0xfe00707f
SH2ADDShift left by 2 and add0010000----------100-----01100110x200040330xfe00707f
SH2ADD.UWShift unsigned word left by 2 and add0010000----------100-----01110110x2000403b0xfe00707f
SH3ADDShift left by 3 and add0010000----------110-----01100110x200060330xfe00707f
SH3ADD.UWShift unsigned word left by 3 and add0010000----------110-----01110110x2000603b0xfe00707f
SLLI.UWShift left unsigned word (Immediate)000010-----------001-----00110110x800101b0xfc00707f
XNORExclusive NOR0100000----------100-----01100110x400040330xfe00707f
ZEXT.HZero-extend halfword000010000000-----100-----01110110x800403b0xfff0707f
ZEXT.H.RV32000010000000-----100-----01100110x80040330xfff0707f