/[qemu]/qemu/tests/test-i386.c
ViewVC logotype

Diff of /qemu/tests/test-i386.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by bellard, Sun Nov 14 15:39:16 2004 UTC revision 1.41 by bellard, Mon Jan 3 23:25:56 2005 UTC
# Line 32  Line 32 
32    
33  #define TEST_CMOV  0  #define TEST_CMOV  0
34  #define TEST_FCOMI 0  #define TEST_FCOMI 0
35    #define TEST_VM86
36  //#define LINUX_VM86_IOPL_FIX  //#define LINUX_VM86_IOPL_FIX
37  //#define TEST_P4_FLAGS  //#define TEST_P4_FLAGS
38    
# Line 372  void test_imulw2(int op0, int op1) Line 373  void test_imulw2(int op0, int op1)
373      s1 = op1;      s1 = op1;
374      res = s0;      res = s0;
375      flags = 0;      flags = 0;
376      asm ("push %4\n\t"      asm volatile ("push %4\n\t"
377           "popf\n\t"           "popf\n\t"
378           "imulw %w2, %w0\n\t"           "imulw %w2, %w0\n\t"
379           "pushf\n\t"           "pushf\n\t"
# Line 390  void test_imull2(int op0, int op1) Line 391  void test_imull2(int op0, int op1)
391      s1 = op1;      s1 = op1;
392      res = s0;      res = s0;
393      flags = 0;      flags = 0;
394      asm ("push %4\n\t"      asm volatile ("push %4\n\t"
395           "popf\n\t"           "popf\n\t"
396           "imull %2, %0\n\t"           "imull %2, %0\n\t"
397           "pushf\n\t"           "pushf\n\t"
# Line 406  void test_imull2(int op0, int op1) Line 407  void test_imull2(int op0, int op1)
407      int res, flags;\      int res, flags;\
408      flags = 0;\      flags = 0;\
409      res = 0;\      res = 0;\
410      asm ("push %3\n\t"\      asm volatile ("push %3\n\t"\
411           "popf\n\t"\           "popf\n\t"\
412           "imul" size " $" #op0 ", %" size1 "2, %" size1 "0\n\t" \           "imul" size " $" #op0 ", %" size1 "2, %" size1 "0\n\t" \
413           "pushf\n\t"\           "pushf\n\t"\
# Line 414  void test_imull2(int op0, int op1) Line 415  void test_imull2(int op0, int op1)
415           : "=r" (res), "=g" (flags)\           : "=r" (res), "=g" (flags)\
416           : "r" (op1), "1" (flags), "0" (res));\           : "r" (op1), "1" (flags), "0" (res));\
417      printf("%-10s A=%08x B=%08x R=%08x CC=%04x\n",\      printf("%-10s A=%08x B=%08x R=%08x CC=%04x\n",\
418             "imul" size, op0, op1, res, flags & CC_MASK);\             "imul" size " im", op0, op1, res, flags & CC_MASK);\
419  }  }
420    
421    
# Line 1673  static void test_enter(void) Line 1674  static void test_enter(void)
1674      TEST_ENTER("w", uint16_t, 31);      TEST_ENTER("w", uint16_t, 31);
1675  }  }
1676    
   
1677  static void *call_end __init_call = NULL;  static void *call_end __init_call = NULL;
1678    
1679  int main(int argc, char **argv)  int main(int argc, char **argv)
# Line 1697  int main(int argc, char **argv) Line 1697  int main(int argc, char **argv)
1697      test_lea();      test_lea();
1698      test_segs();      test_segs();
1699      test_code16();      test_code16();
1700    #ifdef TEST_VM86
1701      test_vm86();      test_vm86();
1702    #endif
1703      test_exceptions();      test_exceptions();
1704      test_self_modifying_code();      test_self_modifying_code();
1705      test_single_step();      test_single_step();

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26