aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--travis/test/float.asm183
-rw-r--r--travis/test/float.bin.tbin0 -> 1148 bytes
-rw-r--r--travis/test/float.json12
3 files changed, 195 insertions, 0 deletions
diff --git a/travis/test/float.asm b/travis/test/float.asm
new file mode 100644
index 00000000..c0978b58
--- /dev/null
+++ b/travis/test/float.asm
@@ -0,0 +1,183 @@
+;
+; Test of floating-point formats
+;
+
+; 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
+
+; 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
+
+; 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
diff --git a/travis/test/float.bin.t b/travis/test/float.bin.t
new file mode 100644
index 00000000..3a688d6c
--- /dev/null
+++ b/travis/test/float.bin.t
Binary files differ
diff --git a/travis/test/float.json b/travis/test/float.json
new file mode 100644
index 00000000..0bb8d454
--- /dev/null
+++ b/travis/test/float.json
@@ -0,0 +1,12 @@
+[
+ {
+ "description": "Test of floating-point formats",
+ "id": "float",
+ "format": "bin",
+ "source": "float.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "float.bin" }
+ ]
+ }
+]