c.zext.h

Zero-extend halfword, 16-bit encoding

This instruction is defined by:

Encoding

svg

Synopsis

Takes a single source/destination operand. This instruction zero-extends the least-significant halfword of the source to XLEN by inserting 0’s into all of the bits more significant than 15.

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

Bits<3> xd = $encoding[9:7];

Execution

  • Pruned, XLEN == 64

  • Original

X[creg2reg(xd)] = X[creg2reg(xd)][15:0];
if (implemented?(ExtensionName::B) && (CSR[misa].B == 1'b0)) {
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
if (implemented?(ExtensionName::C) && (CSR[misa].C == 1'b0)) {
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
X[creg2reg(xd)] = X[creg2reg(xd)][15:0];