aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-04 18:29:24 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:45 +0300
commitfe6f73878aba8aca052b385208b55263e5bfe981 (patch)
treecf8ff5c0191b5eb58beb2a347bfc88714ab0fc39 /travis/test
parente55f0b9dafd802f920ff28dc26c1f4e1d8f32ec0 (diff)
downloadnasm-fe6f73878aba8aca052b385208b55263e5bfe981.tar.gz
nasm-fe6f73878aba8aca052b385208b55263e5bfe981.tar.xz
nasm-fe6f73878aba8aca052b385208b55263e5bfe981.zip
test: nasm-t -- Add floatb test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test')
-rw-r--r--travis/test/floatb.asm32
-rw-r--r--travis/test/floatb.bin.tbin0 -> 112 bytes
-rw-r--r--travis/test/floatb.json12
3 files changed, 44 insertions, 0 deletions
diff --git a/travis/test/floatb.asm b/travis/test/floatb.asm
new file mode 100644
index 00000000..cbf9681b
--- /dev/null
+++ b/travis/test/floatb.asm
@@ -0,0 +1,32 @@
+ ;; Known problematic floating-point numbers and their proper
+ ;; encoding...
+
+ bits 64
+
+ dd 1.1e10
+ dd 0x5023e9ac ; Should be...
+
+ dd 50.40e9
+ dd 0x513bc130 ; Should be...
+
+ dq 1.4e23
+ dq 0x44bda56a4b0835c0
+
+ dq 50.48e21
+ dq 0x44a5610d7502feae
+
+ dt 1.2e28
+ dq 0x9b18ab5df7180b6c
+ dw 0x405c
+
+ dt 50.46e25
+ dq 0xd0b29a67e95dcb60
+ dw 0x4057
+
+ ;; Way too big numbers, should overflow to +Inf
+ dd 1.0E646456955
+ dd 1.0E646456956
+ dd 1.0E2147483646
+ dd 1.0E2147483647
+ dd 1.0E2147483648
+ dd 1.0E2147483649
diff --git a/travis/test/floatb.bin.t b/travis/test/floatb.bin.t
new file mode 100644
index 00000000..3fc9be23
--- /dev/null
+++ b/travis/test/floatb.bin.t
Binary files differ
diff --git a/travis/test/floatb.json b/travis/test/floatb.json
new file mode 100644
index 00000000..18ba8b6f
--- /dev/null
+++ b/travis/test/floatb.json
@@ -0,0 +1,12 @@
+[
+ {
+ "description": "Test of known floating-point bugs",
+ "id": "floatb",
+ "format": "bin",
+ "source": "floatb.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "floatb.bin" }
+ ]
+ }
+]