about summary refs log tree commit diff stats
path: root/test/arch/x86/qemu/testqemu.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2017-03-31 15:09:01 +0200
committerAjax <commial@gmail.com>2017-04-06 13:47:38 +0200
commit620c96e891d0ad356332713a23b39b9d2382470c (patch)
tree7ce86a2fcc502800a4c426a43cb362e17ed80002 /test/arch/x86/qemu/testqemu.py
parentb1ed94019554b25d4d8924594f8868318e8a8c4a (diff)
downloadmiasm-620c96e891d0ad356332713a23b39b9d2382470c.tar.gz
miasm-620c96e891d0ad356332713a23b39b9d2382470c.zip
Introduce a naive "System V" calling convention
Diffstat (limited to 'test/arch/x86/qemu/testqemu.py')
-rw-r--r--test/arch/x86/qemu/testqemu.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/arch/x86/qemu/testqemu.py b/test/arch/x86/qemu/testqemu.py
index 5f26d6f3..e6c487f2 100644
--- a/test/arch/x86/qemu/testqemu.py
+++ b/test/arch/x86/qemu/testqemu.py
@@ -40,7 +40,7 @@ nb_tests = 1
 def xxx___printf_chk(jitter):
     """Tiny implementation of printf_chk"""
     global nb_tests
-    ret_ad, args = jitter.func_args_cdecl(["out", "format"])
+    ret_ad, args = jitter.func_args_systemv(["out", "format"])
     if args.out != 1:
         raise RuntimeError("Not implemented")
     fmt = jitter.get_str_ansi(args.format)
@@ -89,7 +89,7 @@ def xxx___printf_chk(jitter):
 
     sys.stdout.write("[%d] %s" % (nb_tests, output))
     nb_tests += 1
-    jitter.func_ret_cdecl(ret_ad, 0)
+    jitter.func_ret_systemv(ret_ad, 0)
 
 def xxx_puts(jitter):
     '''
@@ -98,7 +98,7 @@ def xxx_puts(jitter):
 
     writes the string s and a trailing newline to stdout.
     '''
-    ret_addr, args = jitter.func_args_cdecl(['target'])
+    ret_addr, args = jitter.func_args_systemv(['target'])
     output = jitter.get_str_ansi(args.target)
     # Check with expected result
     line = expected.next()
@@ -106,7 +106,7 @@ def xxx_puts(jitter):
         print "Expected:", line
         print "Obtained:", output
         raise RuntimeError("Bad semantic")
-    return jitter.func_ret_cdecl(ret_addr, 1)
+    return jitter.func_ret_systemv(ret_addr, 1)
 
 # Parse arguments
 parser = Sandbox_Linux_x86_32.parser(description="ELF sandboxer")