about summary refs log tree commit diff stats
path: root/test/arch/x86/unit/mn_float.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/arch/x86/unit/mn_float.py')
-rw-r--r--test/arch/x86/unit/mn_float.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/arch/x86/unit/mn_float.py b/test/arch/x86/unit/mn_float.py
new file mode 100644
index 00000000..863e86c3
--- /dev/null
+++ b/test/arch/x86/unit/mn_float.py
@@ -0,0 +1,22 @@
+#! /usr/bin/env python
+from asm_test import Asm_Test
+
+
+class Test_FADD(Asm_Test):
+    TXT = '''
+    main:
+       ; test float
+       PUSH 0
+       FLD1
+       FLD1
+       FADD ST, ST(1)
+       FIST  DWORD PTR [ESP]
+       POP  EAX
+       RET
+    '''
+    def check(self):
+        assert(self.myjit.cpu.EAX == 2)
+
+
+if __name__ == "__main__":
+    [test()() for test in [Test_FADD]]