Commit 872ea0c098f63a36de8c49eb2cf348cd111292b9
1 parent
f0d5e471
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 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5277 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
7 additions
and
4 deletions
linux-user/syscall.c
... | ... | @@ -3075,10 +3075,11 @@ void syscall_init(void) |
3075 | 3075 | target_to_host_errno_table[host_to_target_errno_table[i]] = i; |
3076 | 3076 | |
3077 | 3077 | /* automatic consistency check if same arch */ |
3078 | -#if defined(__i386__) && defined(TARGET_I386) && defined(TARGET_ABI32) | |
3079 | - if (ie->target_cmd != ie->host_cmd) { | |
3080 | - fprintf(stderr, "ERROR: ioctl: target=0x%x host=0x%x\n", | |
3081 | - ie->target_cmd, ie->host_cmd); | |
3078 | +#if (defined(__i386__) && defined(TARGET_I386) && defined(TARGET_ABI32)) || \ | |
3079 | + (defined(__x86_64__) && defined(TARGET_X86_64)) | |
3080 | + if (unlikely(ie->target_cmd != ie->host_cmd)) { | |
3081 | + fprintf(stderr, "ERROR: ioctl(%s): target=0x%x host=0x%x\n", | |
3082 | + ie->name, ie->target_cmd, ie->host_cmd); | |
3082 | 3083 | } |
3083 | 3084 | #endif |
3084 | 3085 | ie++; | ... | ... |
tests/test-i386.c
... | ... | @@ -489,10 +489,12 @@ void test_loop(void) |
489 | 489 | }; |
490 | 490 | int i, res; |
491 | 491 | |
492 | +#if !defined(__x86_64__) | |
492 | 493 | TEST_LOOP("jcxz"); |
493 | 494 | TEST_LOOP("loopw"); |
494 | 495 | TEST_LOOP("loopzw"); |
495 | 496 | TEST_LOOP("loopnzw"); |
497 | +#endif | |
496 | 498 | |
497 | 499 | TEST_LOOP("jecxz"); |
498 | 500 | TEST_LOOP("loopl"); | ... | ... |