test: nasm-t -- Add floatb test

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-04 18:29:24 +03:00
parent e55f0b9daf
commit fe6f73878a
3 changed files with 44 additions and 0 deletions

32
travis/test/floatb.asm Normal file
View File

@ -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

BIN
travis/test/floatb.bin.t Normal file

Binary file not shown.

12
travis/test/floatb.json Normal file
View File

@ -0,0 +1,12 @@
[
{
"description": "Test of known floating-point bugs",
"id": "floatb",
"format": "bin",
"source": "floatb.asm",
"option": "-Ox",
"target": [
{ "output": "floatb.bin" }
]
}
]