mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
This is a mostly automated, partially AI-assisted migration of tests from the test/ directory into the travis framework. Running tests manually in the test/ directory is still supported, but move common include files into travis/test and add a default -I option to Makefile.in in the test/ directory. The incbin test fails for pre-existing reasons; for now it contains an stderr file with the errors. The problem is that INCBIN is both a macro and a special instruction (not even a directive...), but there currently is no way to handle prefixes, *especially* TIMES, in multi-line macros. This is a separate problem and needs to be dealt with as such. Reorganize the travis directory so that each test or collection of tests are in a separate subdirectory of travis/, and travis itself lives in tools/travis to avoid creating deeper paths. Add support for recording compression options in the travis .json files, so that compressed files can be recreated with the same options: because of the generally repetitive nature of the binary output test files, the parameters used for xz compression can matter enormously. These are combined into a single huge commit to avoid adding large binary files into the repository that then would immediately be obsoleted, but still retained in git. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
217 lines
3.6 KiB
NASM
217 lines
3.6 KiB
NASM
;
|
|
; Test of floating-point formats
|
|
;
|
|
|
|
%use fp
|
|
|
|
; 8-bit
|
|
db 1.0
|
|
db +1.0
|
|
db -1.0
|
|
db 1.5
|
|
db +1.5
|
|
db -1.5
|
|
db 0.0
|
|
db +0.0
|
|
db -0.0
|
|
db 1.83203125
|
|
db +1.83203125
|
|
db -1.83203125
|
|
db 1.83203125e1
|
|
db +1.83203125e1
|
|
db -1.83203125e1
|
|
db 1.83203125e-1
|
|
db +1.83203125e-1
|
|
db -1.83203125e-1
|
|
db 1.13203125e-2 ; Denormal!
|
|
db +1.13203125e-2 ; Denormal!
|
|
db -1.13203125e-2 ; Denormal!
|
|
db __Infinity__
|
|
db +__Infinity__
|
|
db -__Infinity__
|
|
db __NaN__
|
|
db __QNaN__
|
|
db __SNaN__
|
|
db 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|
|
|
|
; 16-bit
|
|
dw 1.0
|
|
dw +1.0
|
|
dw -1.0
|
|
dw 1.5
|
|
dw +1.5
|
|
dw -1.5
|
|
dw 0.0
|
|
dw +0.0
|
|
dw -0.0
|
|
dw 1.83203125
|
|
dw +1.83203125
|
|
dw -1.83203125
|
|
dw 1.83203125e3
|
|
dw +1.83203125e3
|
|
dw -1.83203125e3
|
|
dw 1.83203125e-3
|
|
dw +1.83203125e-3
|
|
dw -1.83203125e-3
|
|
dw 1.83203125e-6 ; Denormal!
|
|
dw +1.83203125e-6 ; Denormal!
|
|
dw -1.83203125e-6 ; Denormal!
|
|
dw __Infinity__
|
|
dw +__Infinity__
|
|
dw -__Infinity__
|
|
dw __NaN__
|
|
dw __QNaN__
|
|
dw __SNaN__
|
|
dw 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|
|
|
|
; 16-bit bfloat
|
|
bf16 1.0
|
|
bf16 +1.0
|
|
bf16 -1.0
|
|
bf16 1.5
|
|
bf16 +1.5
|
|
bf16 -1.5
|
|
bf16 0.0
|
|
bf16 +0.0
|
|
bf16 -0.0
|
|
bf16 1.83203125
|
|
bf16 +1.83203125
|
|
bf16 -1.83203125
|
|
bf16 1.83203125e15
|
|
bf16 +1.83203125e15
|
|
bf16 -1.83203125e15
|
|
bf16 1.83203125e-15
|
|
bf16 +1.83203125e-15
|
|
bf16 -1.83203125e-15
|
|
bf16 1.83203125e-40 ; Denormal!
|
|
bf16 +1.83203125e-40 ; Denormal!
|
|
bf16 -1.83203125e-40 ; Denormal!
|
|
bf16 __Infinity__
|
|
bf16 +__Infinity__
|
|
bf16 -__Infinity__
|
|
bf16 __NaN__
|
|
bf16 __QNaN__
|
|
bf16 __SNaN__
|
|
bf16 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|
|
bf16 -3.1415, NaN, 2000.0, +Inf
|
|
|
|
; 32-bit
|
|
dd 1.0
|
|
dd +1.0
|
|
dd -1.0
|
|
dd 1.5
|
|
dd +1.5
|
|
dd -1.5
|
|
dd 0.0
|
|
dd +0.0
|
|
dd -0.0
|
|
dd 1.83203125
|
|
dd +1.83203125
|
|
dd -1.83203125
|
|
dd 1.83203125e15
|
|
dd +1.83203125e15
|
|
dd -1.83203125e15
|
|
dd 1.83203125e-15
|
|
dd +1.83203125e-15
|
|
dd -1.83203125e-15
|
|
dd 1.83203125e-40 ; Denormal!
|
|
dd +1.83203125e-40 ; Denormal!
|
|
dd -1.83203125e-40 ; Denormal!
|
|
dd __Infinity__
|
|
dd +__Infinity__
|
|
dd -__Infinity__
|
|
dd __NaN__
|
|
dd __QNaN__
|
|
dd __SNaN__
|
|
dd 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|
|
dd -3.1415, NaN, 2000.0, +Inf
|
|
|
|
; 64-bit
|
|
dq 1.0
|
|
dq +1.0
|
|
dq -1.0
|
|
dq 1.5
|
|
dq +1.5
|
|
dq -1.5
|
|
dq 0.0
|
|
dq +0.0
|
|
dq -0.0
|
|
dq 1.83203125
|
|
dq +1.83203125
|
|
dq -1.83203125
|
|
dq 1.83203125e300
|
|
dq +1.83203125e300
|
|
dq -1.83203125e300
|
|
dq 1.83203125e-300
|
|
dq +1.83203125e-300
|
|
dq -1.83203125e-300
|
|
dq 1.83203125e-320 ; Denormal!
|
|
dq +1.83203125e-320 ; Denormal!
|
|
dq -1.83203125e-320 ; Denormal!
|
|
dq __Infinity__
|
|
dq +__Infinity__
|
|
dq -__Infinity__
|
|
dq __NaN__
|
|
dq __QNaN__
|
|
dq __SNaN__
|
|
dq 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|
|
|
|
; 80-bit
|
|
dt 1.0
|
|
dt +1.0
|
|
dt -1.0
|
|
dt 1.5
|
|
dt +1.5
|
|
dt -1.5
|
|
dt 0.0
|
|
dt +0.0
|
|
dt -0.0
|
|
dt 1.83203125
|
|
dt +1.83203125
|
|
dt -1.83203125
|
|
dt 1.83203125e+4000
|
|
dt +1.83203125e+4000
|
|
dt -1.83203125e+4000
|
|
dt 1.83203125e-4000
|
|
dt +1.83203125e-4000
|
|
dt -1.83203125e-4000
|
|
dt 1.83203125e-4940 ; Denormal!
|
|
dt +1.83203125e-4940 ; Denormal!
|
|
dt -1.83203125e-4940 ; Denormal!
|
|
dt __Infinity__
|
|
dt +__Infinity__
|
|
dt -__Infinity__
|
|
dt __NaN__
|
|
dt __QNaN__
|
|
dt __SNaN__
|
|
dt 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|
|
|
|
; 128-bit
|
|
do 1.0
|
|
do +1.0
|
|
do -1.0
|
|
do 1.5
|
|
do +1.5
|
|
do -1.5
|
|
do 0.0
|
|
do +0.0
|
|
do -0.0
|
|
do 1.83203125
|
|
do +1.83203125
|
|
do -1.83203125
|
|
do 1.83203125e+4000
|
|
do +1.83203125e+4000
|
|
do -1.83203125e+4000
|
|
do 1.83203125e-4000
|
|
do +1.83203125e-4000
|
|
do -1.83203125e-4000
|
|
do 1.83203125e-4940 ; Denormal!
|
|
do +1.83203125e-4940 ; Denormal!
|
|
do -1.83203125e-4940 ; Denormal!
|
|
do __Infinity__
|
|
do +__Infinity__
|
|
do -__Infinity__
|
|
do __NaN__
|
|
do __QNaN__
|
|
do __SNaN__
|
|
do 3.1415926535_8979323846_2643383279_5028841971_6939937510_5
|