Skip to contentSkip to conversation

[5277] Enable same-arch consistency check on x86-64, print syscall name on error.

Qemu-devel Andrzej Zaborowski 1 participant 1 message Sep 21, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5277

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5277
Author:   balrog
Date:     2008-09-21 02:31:19 +0000 (Sun, 21 Sep 2008)

Log Message:
-----------
Enable same-arch consistency check on x86-64, print syscall name on error.

Also disable testing instructions unsupported by 64-bit binutils in test-i386.c

Modified Paths:
--------------

    trunk/linux-user/syscall.c
    trunk/tests/test-i386.c

Modified: trunk/linux-user/syscall.c
===================================================================

linux-user/syscall.c +5 -4
@@ -3075,10 +3075,11 @@
                 target_to_host_errno_table[host_to_target_errno_table[i]] = i;
 
         /* automatic consistency check if same arch */
-#if defined(__i386__) && defined(TARGET_I386) && defined(TARGET_ABI32)
-        if (ie->target_cmd != ie->host_cmd) {
-            fprintf(stderr, "ERROR: ioctl: target=0x%x host=0x%x\n",
-                    ie->target_cmd, ie->host_cmd);
+#if (defined(__i386__) && defined(TARGET_I386) && defined(TARGET_ABI32)) || \
+    (defined(__x86_64__) && defined(TARGET_X86_64))
+        if (unlikely(ie->target_cmd != ie->host_cmd)) {
+            fprintf(stderr, "ERROR: ioctl(%s): target=0x%x host=0x%x\n",
+                    ie->name, ie->target_cmd, ie->host_cmd);
         }
 #endif
         ie++;

Modified: trunk/tests/test-i386.c
===================================================================

tests/test-i386.c +2 -0
@@ -489,10 +489,12 @@
     };
     int i, res;
 
+#if !defined(__x86_64__)
     TEST_LOOP("jcxz");
     TEST_LOOP("loopw");
     TEST_LOOP("loopzw");
     TEST_LOOP("loopnzw");
+#endif
 
     TEST_LOOP("jecxz");
     TEST_LOOP("loopl");