FLI.H

RISC-V FLI.H Instruction Details

Instruction ManualR-type

Load one half-precision floating-point constant from the 32-entry Zfa constant table.

Instruction Syntax

fli.h rd, constant
Operand Breakdown
rd: destination floating-point register.
constant: assembler-level Zfa FLI table constant; the machine encoding uses rs1 to select entries 0-31.
ZfaZfhZvfhFloating-Point Convert

Instruction Behavior

FLI.H uses the OP-FP R-type field layout: rs1 encodes an index into the 32-entry Zfa floating-point constant table, funct5=11110, fmt=H, rs2=1, and funct3=000; it writes the selected half-precision constant to f[rd]. It requires Zfa plus Zfh or Zvfh and is not an arbitrary immediate encoding. Entry 1 is the half-precision minimum positive normal number, entries 29 and 30 are both +inf, and entry 31 is canonical NaN. Loading the constant sets no floating-point exception flags.

FLI.H Decode And Execute Animation

Shows the Zfa FLI OP-FP fixed fields, rs1 constant-table index, and FP-register writeback; it has neither an arbitrary FP immediate nor rounding.

rd
constant
fli.h
,
31..27
26..25
24..20
19..15
14..12
11..7
6..0
11110
FLI
10
fmt
00001
fixed 1
10000
table index
000
fixed
01010
FP rd
1010011
OP-FP
Execution Data Path
instruction
0xF4180553
opcode
1010011 -> OP-FP
funct5 / fmt
11110 / 10 -> FLI.H
fixed fields
rs2=00001, funct3=000
constant index
rs1=16 -> 1.0
destination
rd=fa0(f10)
writeback
fa0(f10) = 1.0; fflags unchanged
Current Step

Fetch: show the 32-bit OP-FP FLI encoding

FLI uses the OP-FP field layout; it does not place an arbitrary FP literal in a normal I-type immediate field.

Awaiting FP-register writeback

This animation shows only Zfa FLI ISA-visible field selection, official constant-table selection, and register result; it does not model assembler implementation, FPU pipelines, exception handling, or microarchitectural timing.

Quick Understanding & Search Notes

FLI.H selects one half-precision constant from the official 32-entry table through the instruction rs1 field and writes it to rd; it cannot express an arbitrary binary floating literal.

Entry 1 varies by target format and is the minimum positive normal number for H/S/D/Q.
Entries 30 and 31 are +inf and canonical NaN; loading them does not raise exception flags.

Common Usage Scenarios

Floating-Point Constants

Understand this scenario with real code like «fli.h f0, 1.0 # f0 = 1.0».

Pre-Use Checklist

Syntax Check
  • rd: destination floating-point register.
  • constant: assembler-level Zfa FLI table constant; the machine encoding uses rs1 to select entries 0-31.
Semantic Check
  • Confirm the constant is one of the official 32 Zfa FLI table entries.
  • Confirm this instruction does not load arbitrary floating immediates and does not set floating-point exception flags.

Pitfalls / Common Confusions

The constant must be representable by the official FLI table; it is not an arbitrary floating-point immediate.
The rs1 field actually encodes a table index from 0 to 31.
Loading +inf or canonical NaN still sets no floating-point exception flags.

FAQ

Can FLI.H load any floating-point constant?

No. It can select only the 32 table entries defined by Zfa.

How is the constant encoded for FLI.H?

The assembler maps an accepted constant name or value to a 0-31 table index in the rs1 field.