From: lkcl Date: Wed, 25 May 2022 18:57:40 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2085 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f5fa006c840b17b4296ce76911b27491241b4ea;p=libreriscv.git --- diff --git a/openpower/sv/int_fp_mv.mdwn b/openpower/sv/int_fp_mv.mdwn index 9290753d7..bbcc5b8e9 100644 --- a/openpower/sv/int_fp_mv.mdwn +++ b/openpower/sv/int_fp_mv.mdwn @@ -110,10 +110,8 @@ v3.1 Prefixed (`pfmvis` and `pfishmv`). If so it is recommended that Reinterprets `FI << 16` as a 32-bit float, which is then converted to a 64-bit float and written to `FRT`. This is equivalent to reinterpreting `FI` as a `BF16` and converting to 64-bit float. - There is no need for an Rc=1 variant because this is an immediate loading -instruction. This frees up one extra bit in the X-Form format for packing -a full `BF16`. +instruction. Example: @@ -156,6 +154,12 @@ Pseudocode: `fishmv FRS, FI` +DX-Form: + +| 0-5 | 6-10 | 11-15 | 16-25 | 26-30 | 31 | Form | +|--------|------|-------|-------|-------|-----|-----| +| Major | FRS | d1 | d0 | XO | d2 | DX-Form | + Strategically similar to how `oris` is used to construct 32-bit Integers, an additional 16-bits of immediate is inserted into `FRS` to extend its accuracy to @@ -163,16 +167,16 @@ a full FP32. If a prior `fmvis` instruction had been used to set the upper 16-bits of an FP32 value, `fishmv` contains the lower 16-bits. -`fishmv` fits with DX-Form: - -| 0-5 | 6-10 | 11-15 | 16-25 | 26-30 | 31 | Form | -|--------|------|-------|-------|-------|-----|-----| -| Major | FRS | d1 | d0 | XO | d2 | DX-Form | +The key difference between using `li` and `oris` to construxt 32-bit +GPR Immediates and `fishmv` is that the `fmvis` will have converted +the `BF16` to FP64 (Double) format. This is taken into consideration +as can be seen in the pseudocode below Pseudocode: - fp32 = FRS[0:15] || d0 || d1 || d2 - FRS = Single_to_Double(fp32) + fp32 = Double_to_Single(FRS) + n = fp32[0:15] || d0 || d1 || d2 + FRS = Single_to_Double(n) *This instruction performs a Read-Modify-Write. FRS is read, the additional 16 bit immediate inserted, and the result also written to FRS*