From: Luke Kenneth Casson Leighton Date: Fri, 9 Feb 2024 11:37:38 +0000 (+0000) Subject: bug 1015:deferring the TODO, it can wait. spelling. whitespace X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=784006757c058e00f227c613ed36c790af561d13;p=libreriscv.git bug 1015:deferring the TODO, it can wait. spelling. whitespace --- diff --git a/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn b/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn index 3187d5322..e9be58c36 100644 --- a/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn +++ b/openpower/sv/int_fp_mv/cvt_fp_to_int_overview.mdwn @@ -2,7 +2,7 @@
-IEEE 754 doesn't specify what results are obtained when converting a NaN +IEEE 754 does not specify what results are obtained when converting a NaN or out-of-range floating-point value to integer, so different programming languages and ISAs have made different choices. The different conversion modes supported by the `cffpr` instruction are as follows: @@ -53,26 +53,26 @@ modes supported by the `cffpr` instruction are as follows: ### Floating-point to Integer Conversion Semantics Summary -Let `rounded` be the result of `bfp_ROUND_TO_INTEGER(rmode, input)`. +Let `round` be the result of `bfp_ROUND_TO_INTEGER(rmode, input)`. Let `w` be the number of bits in the result's type. The result of Floating-point to Integer conversion is as follows: ``` -+--------+------------+-----------------------------------------------------------------------+ -| Type | Result's | Category of rounded | -| | Signedness +-----------+-----------+-----------+-----------+-----------+-----------+ -| | | NaN | +Infinity | -Infinity | > Maximum | < Minimum | Otherwise | -| | | | | | Possible | Possible | | -| | | | | | Result | Result | | -+--------+------------+-----------+-----------+-----------+-----------+-----------+-----------+ -| P-Type | Unsigned | 0 | 2^w - 1 | 0 | 2^w - 1 | 0 | rounded | -| +------------+-----------+-----------+-----------+-----------+-----------+-----------+ -| | Signed | -2^(w-1) | 2^(w-1)-1 | -2^(w-1) | 2^(w-1)-1 | -2^(w-1) | rounded | -+--------+------------+-----------+-----------+-----------+-----------+-----------+-----------+ -| S-Type | Unsigned | 0 | 2^w - 1 | 0 | 2^w - 1 | 0 | rounded | -| +------------+-----------+-----------+-----------+-----------+-----------+-----------+ -| | Signed | 0 | 2^(w-1)-1 | -2^(w-1) | 2^(w-1)-1 | -2^(w-1) | rounded | -+--------+------------+-----------+-----------+-----------+-----------+-----------+-----------+ -| E-Type | Either | 0 | rounded & (2^w - 1) | -+--------+------------+-----------------------------------+-----------------------------------+ ++------+------+---------------------------------------------------------------+ +|Type| Result | Category of rounding | +| | Sign +----------+-----------+----------+-----------+---------+-------+ +| | | NaN | +Inf | -Inf | > Max | < Min | Else | +| | | | | | Possible | Possible| | +| | | | | | Result | Result | | ++----+--------+----------+-----------+----------+-----------+---------+-------+ +| P |Unsigned| 0 | 2^w - 1 | 0 | 2^w - 1 | 0 | round | +| +--------+----------+-----------+----------+-----------+---------+-------+ +| | Signed | -2^(w-1) | 2^(w-1)-1 | -2^(w-1) | 2^(w-1)-1 | -2^(w-1)| round | ++----+--------+----------+-----------+----------+-----------+---------+-------+ +| S |Unsigned| 0 | 2^w - 1 | 0 | 2^w - 1 | 0 | round | +| +--------+----------+-----------+----------+-----------+---------+-------+ +| | Signed | 0 | 2^(w-1)-1 | -2^(w-1) | 2^(w-1)-1 | -2^(w-1)| round | ++----+--------+----------+-----------+----------+-----------+---------+-------+ +| E | Either | 0 | round & (2^w - 1) | ++----+--------+---------------------------------+-----------------------------+ ``` diff --git a/openpower/sv/int_fp_mv/moves_and_conversions.mdwn b/openpower/sv/int_fp_mv/moves_and_conversions.mdwn index ae74582d0..5e4d2c9cf 100644 --- a/openpower/sv/int_fp_mv/moves_and_conversions.mdwn +++ b/openpower/sv/int_fp_mv/moves_and_conversions.mdwn @@ -337,12 +337,6 @@ Special Registers altered: |-----|------|-------|-------|-------|----|-------|----|---------| | PO | RT | IT | CVM | FRB | OE | XO | Rc | XO-Form | -**TODO: move to Appendix (it's too large. also it really should be executable -and pulled in "automatically" from the openpower-isa directory, into the -PDF but also as an ikiwiki underlay - just not here: in the RFC directory)** - -For the pseudocode of this instruction see Appendix {insert automated reference} - ``` # based on xscvdpuxws reset_xflags() diff --git a/openpower/sv/rfc/Makefile b/openpower/sv/rfc/Makefile index 62d0cc31d..741dfe298 100644 --- a/openpower/sv/rfc/Makefile +++ b/openpower/sv/rfc/Makefile @@ -31,8 +31,8 @@ tex_out/%.mdwn: %.mdwn ../../mdwn_inline.py -V 'monofont:DejaVuSansMono' \ -V 'mathfont:Latin Modern Math' \ --filter ../../pandoc_img.py \ - -V margin-top=0.6in \ - -V margin-bottom=0.6in \ + -V margin-top=0.5in \ + -V margin-bottom=0.5in \ -V margin-left=0.4in \ -V margin-right=0.4in \ -V fontsize=9pt \