about summary refs log tree commit diff stats
path: root/test/arch/x86/unit/mn_float.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2014-09-19 15:26:05 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2014-09-19 15:26:05 +0200
commit032263e8f58573c5cbb61928b9edcc62855c989d (patch)
treeba70f018dba7eb76c6cc122e38ba228f4681f659 /test/arch/x86/unit/mn_float.py
parent8538d98b35837e540b8a6d576bed7c93d86fda86 (diff)
downloadmiasm-032263e8f58573c5cbb61928b9edcc62855c989d.tar.gz
miasm-032263e8f58573c5cbb61928b9edcc62855c989d.zip
test: add mnemonic tests
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]]