ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

fcvt.h.s

T1 riscv fp insn
Convert single-precision float to a half-precision float
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zfhmin, Zhinxmin
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZfhmin, Zhinxmin

Summary

Converts a single-precision number in floating-point register _fs1_ into a half-precision floating-point number in floating-point register _fd_.

Syntax / Encoding

fcvt.h.s fd, fs1, rm | 010001000000xxxxxxxxxxxxx1010011 (mask=0xfff0007f match=0x44000053)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV010001000000xxxxxxxxxxxxx10100110xfff0007f / 0x44000053

Operands

NameDescription
fs1bits [19:15]
rmbits [14:12]
fdbits [11:7]

Reference Notes

Converts a single-precision number in floating-point register _fs1_ into a half-precision floating-point number in
floating-point register _fd_.

`fcvt.h.s` rounds according to the _rm_ field.

All floating-point conversion instructions set the Inexact exception flag if the rounded
result differs from the operand value and the Invalid exception flag is not set.