mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-03 08:41:02 +08:00
72ac77bb0b
Very trivial test for hexadecimal floating-point numbers
126 lines
2.2 KiB
NASM
126 lines
2.2 KiB
NASM
;
|
|
; floatx.asm
|
|
;
|
|
; Test hexadecimal floating-point numbers
|
|
|
|
; 16-bit
|
|
dw 1.0
|
|
dw 0x1.0
|
|
dw 2.0
|
|
dw 0x2.0
|
|
dw 0x1.0p+1
|
|
dw 0x1.0p-1
|
|
dw 0x0.0
|
|
dw 0x1.23456789
|
|
dw 0x0.123456789
|
|
dw 0x0.0000123456789
|
|
dw 0x1.23456789p10
|
|
dw 0x1.23456789p+10
|
|
dw 0x1.23456789p-10
|
|
dw 0x0.123456789p10
|
|
dw 0x0.123456789p+10
|
|
dw 0x0.123456789abcdef0123456789abcdef012345p-10
|
|
dw 0x0.0000123456789
|
|
dw 0x0.0000123456789p+10
|
|
dw 0x0.0000123456789p-10
|
|
|
|
; 32-bit
|
|
dd 1.0
|
|
dd 0x1.0
|
|
dd 2.0
|
|
dd 0x2.0
|
|
dd 0x1.0p+1
|
|
dd 0x1.0p-1
|
|
dd 0x0.0
|
|
dd 0x1.23456789
|
|
dd 0x0.123456789
|
|
dd 0x0.0000123456789
|
|
dd 0x1.23456789p10
|
|
dd 0x1.23456789p+10
|
|
dd 0x1.23456789p-10
|
|
dd 0x0.123456789p10
|
|
dd 0x0.123456789p+10
|
|
dd 0x0.123456789abcdef0123456789abcdef012345p-10
|
|
dd 0x0.0000123456789
|
|
dd 0x0.0000123456789p+10
|
|
dd 0x0.0000123456789p-10
|
|
dd 0x123456789.0
|
|
dd 0x0000123456789.0
|
|
dd 0x123456789.0p+0
|
|
dd 0x123456789.0p+64
|
|
|
|
; 64-bit
|
|
dq 1.0
|
|
dq 0x1.0
|
|
dq 2.0
|
|
dq 0x2.0
|
|
dq 0x1.0p+1
|
|
dq 0x1.0p-1
|
|
dq 0x0.0
|
|
dq 0x1.23456789
|
|
dq 0x0.123456789
|
|
dq 0x0.0000123456789
|
|
dq 0x1.23456789p10
|
|
dq 0x1.23456789p+10
|
|
dq 0x1.23456789p-10
|
|
dq 0x0.123456789p10
|
|
dq 0x0.123456789p+10
|
|
dq 0x0.123456789abcdef0123456789abcdef012345p-10
|
|
dq 0x0.0000123456789
|
|
dq 0x0.0000123456789p+10
|
|
dq 0x0.0000123456789p-10
|
|
dq 0x123456789.0
|
|
dq 0x0000123456789.0
|
|
dq 0x123456789.0p+0
|
|
dq 0x123456789.0p+300
|
|
|
|
; 80-bit
|
|
dt 1.0
|
|
dt 0x1.0
|
|
dt 2.0
|
|
dt 0x2.0
|
|
dt 0x1.0p+1
|
|
dt 0x1.0p-1
|
|
dt 0x0.0
|
|
dt 0x1.23456789
|
|
dt 0x0.123456789
|
|
dt 0x0.0000123456789
|
|
dt 0x1.23456789p10
|
|
dt 0x1.23456789p+10
|
|
dt 0x1.23456789p-10
|
|
dt 0x0.123456789p10
|
|
dt 0x0.123456789p+10
|
|
dt 0x0.123456789abcdef0123456789abcdef012345p-10
|
|
dt 0x0.0000123456789
|
|
dt 0x0.0000123456789p+10
|
|
dt 0x0.0000123456789p-10
|
|
dt 0x123456789.0
|
|
dt 0x0000123456789.0
|
|
dt 0x123456789.0p+0
|
|
dt 0x123456789.0p+1024
|
|
|
|
; 128-bit
|
|
do 1.0
|
|
do 0x1.0
|
|
do 2.0
|
|
do 0x2.0
|
|
do 0x1.0p+1
|
|
do 0x1.0p-1
|
|
do 0x0.0
|
|
do 0x1.23456789
|
|
do 0x0.123456789
|
|
do 0x0.0000123456789
|
|
do 0x1.23456789p10
|
|
do 0x1.23456789p+10
|
|
do 0x1.23456789p-10
|
|
do 0x0.123456789p10
|
|
do 0x0.123456789p+10
|
|
do 0x0.123456789abcdef0123456789abcdef012345p-10
|
|
do 0x0.0000123456789
|
|
do 0x0.0000123456789p+10
|
|
do 0x0.0000123456789p-10
|
|
do 0x123456789.0
|
|
do 0x0000123456789.0
|
|
do 0x123456789.0p+0
|
|
do 0x123456789.0p+1024
|