aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-11-26 21:38:14 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-11-26 21:38:14 -0800
commitd7498067ca06e01b73e9cca6712efa20c11b23b5 (patch)
tree3e35226b7182b056cb10e1464fab5de5352323ea
parent8fa279954c41f73eb7fd8fe3e0bf4a2546916193 (diff)
downloadnasm-d7498067ca06e01b73e9cca6712efa20c11b23b5.tar.gz
nasm-d7498067ca06e01b73e9cca6712efa20c11b23b5.tar.xz
nasm-d7498067ca06e01b73e9cca6712efa20c11b23b5.zip
BR 3392368: actually fix the documentation; add test case
Add a mimimal test case for this bug; correct the documentation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--doc/changes.src10
-rw-r--r--test/floatb.asm29
2 files changed, 29 insertions, 10 deletions
diff --git a/doc/changes.src b/doc/changes.src
index a3bd0cc5..eab31a9c 100644
--- a/doc/changes.src
+++ b/doc/changes.src
@@ -20,11 +20,11 @@ macro. See \k{dfmtm}.
operator refers to an \c{EXTERN} symbol declared further down in the
code.
-\b Fix a corner case in the floating-point code where a
-binary/octal/hexadecimal floating-point constant starting with a digit
-for which the upper bit is 1 (1, 4-7, 8-F respectively) and having at
-least 33 mantissa bits would sometimes produce incorrect results for
-the quad-precision format.
+\b Fix a corner case in the floating-point code where a binary, octal
+or hexadecimal floating-point constant starting with digits 1, 1-3, or
+8-F, respectively, and having at least 32, 11, or 8 mantissa digits,
+could produce incorrect results for the 80-bit and 128-bit
+floating-point formats.
\S{cl-2.14} Version 2.14
diff --git a/test/floatb.asm b/test/floatb.asm
index a4235d08..68bf4aed 100644
--- a/test/floatb.asm
+++ b/test/floatb.asm
@@ -26,11 +26,30 @@
dq 0xd0b29a67e95dcb60
dw 0x4057
- do 0xf.ffffff8
- dt 0xf.ffffff8
- dq 0xf.ffffff8
- dd 0xf.ffffff8
- dw 0xf.ffffff8
+ do 0xf.ffffff8p-4
+ do 0q3.7777777774p-2
+ do 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
+
+ dt 0xf.ffffff8p-4
+ dt 0q3.7777777774p-2
+ dt 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
+
+ dq 0xf.ffffff8p-4
+ dq 0q3.7777777774p-2
+ dq 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
+
+ dd 0xf.ffffff8p-4
+ dd 0q3.7777777774p-2
+ dd 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
+
+ dw 0xf.ffffff8p-4
+ dw 0q3.7777777774p-2
+ dw 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
+
+ db 0xf.ffffff8p-4
+ db 0q3.7777777774p-2
+ db 0b1.1111_1111_1111_1111_1111_1111_1111_111p-1
+
;; Way too big numbers, should overflow to +Inf
dd 1.0E646456955