qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] win32 patch for test-i386
@ 2006-12-15  8:21 oliverst
  0 siblings, 0 replies; only message in thread
From: oliverst @ 2006-12-15  8:21 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

Hi,

a while back I compiled the test-i386 with MinGW and GCC 3.4.5. I attached the .diff for it. Note, that the test will crash with optimizations, so you have to remove the -O2 from the Makefile. Also the TEST_CMOV and TEST_FCOMI will work on non-x86-64 machines.

So long
Oliver

[-- Attachment #2: test-i386.c.diff --]
[-- Type: application/octet-stream, Size: 1634 bytes --]

--- test-i386.c.bak	Thu Dec 14 15:16:27 2006
+++ test-i386.c	Thu Dec 14 15:18:10 2006
@@ -1333,18 +1333,18 @@
 #endif
 
 #if defined(__x86_64__)
-asm(".globl func_lret\n"
-    "func_lret:\n"
+asm(".globl _func_lret\n"
+    "_func_lret:\n"
     "movl $0x87654641, %eax\n"
     "lretq\n");
 #else
-asm(".globl func_lret\n"
-    "func_lret:\n"
+asm(".globl _func_lret\n"
+	"_func_lret:\n"
     "movl $0x87654321, %eax\n"
     "lret\n"
 
-    ".globl func_iret\n"
-    "func_iret:\n"
+    ".globl _func_iret\n"
+    "_func_iret:\n"
     "movl $0xabcd4321, %eax\n"
     "iret\n");
 #endif
@@ -1643,6 +1643,7 @@
 int v1;
 int tab[2];
 
+#if 0
 void sig_handler(int sig, siginfo_t *info, void *puc)
 {
     struct ucontext *uc = puc;
@@ -1832,8 +1833,10 @@
     }
     printf("val=0x%x\n", val);
 }
+#endif
 
 #if !defined(__x86_64__)
+#if 0
 /* specific precise single step test */
 void sig_trap_handler(int sig, siginfo_t *info, void *puc)
 {
@@ -1917,6 +1920,7 @@
     for(i = 0; i < 4; i++)
         printf("sstep_buf2[%d] = %d\n", i, sstep_buf2[i]);
 }
+#endif
 
 /* self modifying code test */
 uint8_t code[] = {
@@ -1924,7 +1928,7 @@
     0xc3, /* ret */
 };
 
-asm("smc_code2:\n"
+asm("_smc_code2:\n"
     "movl 4(%esp), %eax\n"
     "movl %eax, smc_patch_addr2 + 1\n"
     "nop\n"
@@ -2615,10 +2619,10 @@
 #ifdef TEST_VM86
     test_vm86();
 #endif
-    test_exceptions();
+    //test_exceptions();
 #if !defined(__x86_64__)
     test_self_modifying_code();
-    test_single_step();
+    //test_single_step();
 #endif
     test_enter();
 #ifdef TEST_SSE

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-15  8:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-15  8:21 [Qemu-devel] win32 patch for test-i386 oliverst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).