/[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.20 by bellard, Sun Jun 15 19:36:33 2003 UTC revision 1.21 by bellard, Tue Jun 24 13:29:40 2003 UTC
# Line 937  void test_code16(void) Line 937  void test_code16(void)
937      printf("func3() = 0x%08x\n", res);      printf("func3() = 0x%08x\n", res);
938  }  }
939    
940    extern char func_lret32;
941    extern char func_iret32;
942    
943  void test_misc(void)  void test_misc(void)
944  {  {
945      char table[256];      char table[256];
# Line 946  void test_misc(void) Line 949  void test_misc(void)
949      res = 0x12345678;      res = 0x12345678;
950      asm ("xlat" : "=a" (res) : "b" (table), "0" (res));      asm ("xlat" : "=a" (res) : "b" (table), "0" (res));
951      printf("xlat: EAX=%08x\n", res);      printf("xlat: EAX=%08x\n", res);
952    
953        asm volatile ("pushl %%cs ; call %1"
954                      : "=a" (res)
955                      : "m" (func_lret32): "memory", "cc");
956        printf("func_lret32=%x\n", res);
957    
958        asm volatile ("pushfl ; pushl %%cs ; call %1"
959                      : "=a" (res)
960                      : "m" (func_iret32): "memory", "cc");
961        printf("func_iret32=%x\n", res);
962    
963        /* specific popl test */
964        asm volatile ("pushl $12345432 ; pushl $0x9abcdef ; popl (%%esp) ; popl %0"
965                      : "=g" (res));
966        printf("popl esp=%x\n", res);
967  }  }
968    
969  uint8_t str_buffer[4096];  uint8_t str_buffer[4096];

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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