Commit acae4681ae29768c1d5f1641f5a2501c9ace8cf0
1 parent
42ad6ae9
fixed imul im test - added TEST_VM86 define for x86_64 tests
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1182 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
7 additions
and
5 deletions
tests/test-i386.c
| ... | ... | @@ -32,6 +32,7 @@ |
| 32 | 32 | |
| 33 | 33 | #define TEST_CMOV 0 |
| 34 | 34 | #define TEST_FCOMI 0 |
| 35 | +#define TEST_VM86 | |
| 35 | 36 | //#define LINUX_VM86_IOPL_FIX |
| 36 | 37 | //#define TEST_P4_FLAGS |
| 37 | 38 | |
| ... | ... | @@ -372,7 +373,7 @@ void test_imulw2(int op0, int op1) |
| 372 | 373 | s1 = op1; |
| 373 | 374 | res = s0; |
| 374 | 375 | flags = 0; |
| 375 | - asm ("push %4\n\t" | |
| 376 | + asm volatile ("push %4\n\t" | |
| 376 | 377 | "popf\n\t" |
| 377 | 378 | "imulw %w2, %w0\n\t" |
| 378 | 379 | "pushf\n\t" |
| ... | ... | @@ -390,7 +391,7 @@ void test_imull2(int op0, int op1) |
| 390 | 391 | s1 = op1; |
| 391 | 392 | res = s0; |
| 392 | 393 | flags = 0; |
| 393 | - asm ("push %4\n\t" | |
| 394 | + asm volatile ("push %4\n\t" | |
| 394 | 395 | "popf\n\t" |
| 395 | 396 | "imull %2, %0\n\t" |
| 396 | 397 | "pushf\n\t" |
| ... | ... | @@ -406,7 +407,7 @@ void test_imull2(int op0, int op1) |
| 406 | 407 | int res, flags;\ |
| 407 | 408 | flags = 0;\ |
| 408 | 409 | res = 0;\ |
| 409 | - asm ("push %3\n\t"\ | |
| 410 | + asm volatile ("push %3\n\t"\ | |
| 410 | 411 | "popf\n\t"\ |
| 411 | 412 | "imul" size " $" #op0 ", %" size1 "2, %" size1 "0\n\t" \ |
| 412 | 413 | "pushf\n\t"\ |
| ... | ... | @@ -414,7 +415,7 @@ void test_imull2(int op0, int op1) |
| 414 | 415 | : "=r" (res), "=g" (flags)\ |
| 415 | 416 | : "r" (op1), "1" (flags), "0" (res));\ |
| 416 | 417 | printf("%-10s A=%08x B=%08x R=%08x CC=%04x\n",\ |
| 417 | - "imul" size, op0, op1, res, flags & CC_MASK);\ | |
| 418 | + "imul" size " im", op0, op1, res, flags & CC_MASK);\ | |
| 418 | 419 | } |
| 419 | 420 | |
| 420 | 421 | |
| ... | ... | @@ -1673,7 +1674,6 @@ static void test_enter(void) |
| 1673 | 1674 | TEST_ENTER("w", uint16_t, 31); |
| 1674 | 1675 | } |
| 1675 | 1676 | |
| 1676 | - | |
| 1677 | 1677 | static void *call_end __init_call = NULL; |
| 1678 | 1678 | |
| 1679 | 1679 | int main(int argc, char **argv) |
| ... | ... | @@ -1697,7 +1697,9 @@ int main(int argc, char **argv) |
| 1697 | 1697 | test_lea(); |
| 1698 | 1698 | test_segs(); |
| 1699 | 1699 | test_code16(); |
| 1700 | +#ifdef TEST_VM86 | |
| 1700 | 1701 | test_vm86(); |
| 1702 | +#endif | |
| 1701 | 1703 | test_exceptions(); |
| 1702 | 1704 | test_self_modifying_code(); |
| 1703 | 1705 | test_single_step(); | ... | ... |