about summary refs log tree commit diff stats
path: root/test/arch/x86/qemu/testqemu.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-11-17 14:18:16 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2015-11-17 14:18:16 +0100
commita49419dd5e16283b1663181a47cdc85b7eff14dc (patch)
treeeed2791c9c96039c6603d0173646eb4265a85366 /test/arch/x86/qemu/testqemu.py
parentc0826fefbbcd00c60f0e9f27dcac92c98fcb9d8e (diff)
parentbf4c21011c8396b939e147615d12998a11c91dcd (diff)
downloadmiasm-a49419dd5e16283b1663181a47cdc85b7eff14dc.tar.gz
miasm-a49419dd5e16283b1663181a47cdc85b7eff14dc.zip
Merge pull request #277 from commial/fix-x86-xchg
Fix x86 xchg
Diffstat (limited to 'test/arch/x86/qemu/testqemu.py')
-rw-r--r--test/arch/x86/qemu/testqemu.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/arch/x86/qemu/testqemu.py b/test/arch/x86/qemu/testqemu.py
index 7cf2ab75..a7df4fe4 100644
--- a/test/arch/x86/qemu/testqemu.py
+++ b/test/arch/x86/qemu/testqemu.py
@@ -45,6 +45,7 @@ def xxx___printf_chk(jitter):
     fmt = get_str_ansi(jitter, args.format)
     # Manage llx
     fmt = fmt.replace("llx", "lx")
+    fmt = fmt.replace("%016lx", "%016z")
 
     fmt_a = parse_fmt(fmt)
     esp = jitter.cpu.ESP
@@ -61,11 +62,16 @@ def xxx___printf_chk(jitter):
             a2 = upck32(jitter.vm.get_mem(esp + 8 + 4*(i+1), 4))
             a = struct.unpack("d", struct.pack("Q", a2 << 32 | a))[0]
             i += 1
+        elif x.lower() == 'z':
+            a2 = upck32(jitter.vm.get_mem(esp + 8 + 4*(i+1), 4))
+            a = a2 << 32 | a
+            i += 1
         else:
             raise RuntimeError("Not implemented format")
         args.append(a)
         i += 1
 
+    fmt = fmt.replace("%016z", "%016lx")
     output = fmt%(tuple(args))
     # NaN bad repr in Python
     output = output.replace("nan", "-nan")