B Extension

Versions

1.0.0
State

ratified

Ratification date

2024-04

Ratification document

https://drive.google.com/file/d/1SgLoasaBjs5WboQMaU3wpHkjUwV71UZn/view

Implies
  • Zba version 1.0.0

  • Zbb version 1.0.0

  • Zbs version 1.0.0

Synopsis

The B standard extension comprises instructions provided by the Zba, Zbb, and Zbs extensions.

Bit 1 of the misa register encodes the presence of the B standard extension. When misa.B is 1, the implementation supports the instructions provided by the Zba, Zbb, and Zbs extensions. When misa.B is 0, it indicates that the implementation may not support one or more of the Zba, Zbb, or Zbs extensions.

Instructions

The following instructions are defined by this extension:

add.uw

Add unsigned word

andn

AND with inverted operand

bclr

Single-Bit clear (Register)

bclri

Single-Bit clear (Immediate)

bext

Single-Bit extract (Register)

bexti

Single-Bit extract (Immediate)

binv

Single-Bit invert (Register)

binvi

Single-Bit invert (Immediate)

brev8

No synopsis available.

bset

Single-Bit set (Register)

bseti

Single-Bit set (Immediate)

clmul

Carry-less multiply (low-part)

clmulh

Carry-less multiply (high-part)

clmulr

Carry-less multiply (reversed)

clz

Count leading zero bits

clzw

Count leading zero bits in word

cpop

Count set bits

cpopw

Count set bits in word

ctz

Count trailing zero bits

ctzw

Count trailing zero bits in word

gorci

No synopsis available.

grevi

No synopsis available.

max

Maximum

maxu

Unsigned maximum

min

Minimum

minu

Unsigned minumum

orc.b

Bitware OR-combine, byte granule

orn

OR with inverted operand

rev8

Byte-reverse register (RV64 encoding)

rol

Rotate left (Register)

rolw

Rotate left word (Register)

ror

Rotate right (Register)

rori

Rotate right (Immediate)

roriw

Rotate right word (Immediate)

rorw

Rotate right word (Register)

sext.b

Sign-extend byte

sext.h

Sign-extend halfword

sh1add.uw

Shift unsigend word left by 1 and add

sh1add

Shift left by 1 and add

sh2add.uw

Shift unsigend word left by 2 and add

sh2add

Shift left by 2 and add

sh3add.uw

Shift unsigend word left by 3 and add

sh3add

Shift left by 3 and add

shfli

No synopsis available.

slli.uw

Shift left unsigned word (Immediate)

unshfli

No synopsis available.

unzip

No synopsis available.

xnor

Exclusive NOR

xperm16

No synopsis available.

xperm32

No synopsis available.

xperm4

No synopsis available.

xperm8

No synopsis available.

zext.h

Zero-extend halfword

zip

No synopsis available.

Parameters

This extension has the following implementation options:

MUTABLE_MISA_B

Type

boolean

Valid Values

boolean

Description

Indicates whether or not the B extension can be disabled with the misa.B bit.