← Home

zext.h

Zero-extend halfword

Zero-extends the least-significant halfword of the source to XLEN by inserting 0's into all of the bits more significant than 15.

Note: The *zext.h* instruction is a pseudo-op for `pack` when `Zbkb` is implemented and XLEN == 32.

Note: The *zext.h* instruction is a pseudo-op for `packw` when `Zbkb` is implemented and XLEN == 64.

Assembly format

zext.h xd, xs1

Encoding

RV32

313029282726252423222120191817161514131211109876543210
000010000000xs1100xd0110011

RV64

313029282726252423222120191817161514131211109876543210
000010000000xs1100xd0111011

Decode variables

RV32

VariableBitsWidth
xs1[19:15]5
xd[11:7]5

RV64

VariableBitsWidth
xs1[19:15]5
xd[11:7]5

Execution

X[xd] = X[xs1][15:0];

Defined by

Zbb and not Zbkb

Access

SUVSVU
AlwaysAlwaysAlwaysAlways

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.