summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-18 18:37:36 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-18 18:37:36 -0700
commit72ac77bb0b37990aa7cae7a058ae646135280301 (patch)
tree48276a60509bad9632ef44e8d93c78d80220bf87 /test
parent26976a187fa0b3e393118b6bf1a72707b0767ddb (diff)
downloadnasm-72ac77bb0b37990aa7cae7a058ae646135280301.tar.gz
nasm-72ac77bb0b37990aa7cae7a058ae646135280301.tar.bz2
nasm-72ac77bb0b37990aa7cae7a058ae646135280301.zip
Simple test for hexadecimal floating-point numbers
Very trivial test for hexadecimal floating-point numbers
Diffstat (limited to 'test')
-rw-r--r--test/floatx.asm125
1 files changed, 125 insertions, 0 deletions
diff --git a/test/floatx.asm b/test/floatx.asm
new file mode 100644
index 0000000..f513ec8
--- /dev/null
+++ b/test/floatx.asm
@@ -0,0 +1,125 @@
+;
+; 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