Metadata Table | |
---|---|
Manual Type | user |
Spec Revision | 20181106-Base-Ratification |
Spec Release Date | |
Git Revision | 20181106-Base-Ratification |
Git URL | https://github.com/riscv/riscv-isa-manual.git |
Source | src/q.tex |
Conversion Date | 2023/11/12 |
License | CC-by-4.0 |
This chapter describes the Q standard extension for 128-bit binary floating-point instructions compliant with the IEEE 754-2008 arithmetic standard. The 128-bit or quad-precision binary floating-point instruction subset is named “Q”, and requires RV64IFD. The floating-point registers are now extended to hold either a single, double, or quad-precision floating-point value (FLEN=128). The NaN-boxing scheme described in Section [nanboxing] is now extended recursively to allow a single-precision value to be NaN-boxed inside a double-precision value which is itself NaN-boxed inside a quad-precision value.
New 128-bit variants of LOAD-FP and STORE-FP instructions are added, encoded with a new value for the funct3 width field.
FLQ and FSQ are only guaranteed to execute atomically if the effective address is naturally aligned and XLEN=128.
FLQ and FSQ do not modify the bits being transferred; in particular, the payloads of non-canonical NaNs are preserved.
A new supported format is added to the format field of most instructions, as shown in Table [tab:fpextfmt].
fmt field | Mnemonic | Meaning |
---|---|---|
00 | S | 32-bit single-precision |
01 | D | 64-bit double-precision |
10 | H | 16-bit half-precision |
11 | Q | 128-bit quad-precision |
The quad-precision floating-point computational instructions are defined analogously to their double-precision counterparts, but operate on quad-precision operands and produce quad-precision results.
New floating-point to floating-point conversion instructions FCVT.S.Q, FCVT.Q.S, FCVT.D.Q, FCVT.Q.D are added.
Floating-point to floating-point sign-injection instructions, FSGNJ.Q, FSGNJN.Q, and FSGNJX.Q are defined analogously to the double-precision sign-injection instruction.
FMV.X.Q and FMV.Q.X instructions are not provided in RV32 or RV64, so quad-precision bit patterns must be moved to the integer registers via memory.
The quad-precision floating-point compare instructions are defined analogously to their double-precision counterparts, but operate on quad-precision operands.
The quad-precision floating-point classify instruction, FCLASS.Q, is defined analogously to its double-precision counterpart, but operates on quad-precision operands.
RV128 will support FMV.X.Q and FMV.Q.X in the Q extension.