From: oliverst@online.de
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] win32 patch for test-i386
Date: Fri, 15 Dec 2006 08:21:20 -0000 [thread overview]
Message-ID: <26639699.689971166170875764.JavaMail.servlet@kundenserver> (raw)
[-- 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
reply other threads:[~2006-12-15 8:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26639699.689971166170875764.JavaMail.servlet@kundenserver \
--to=oliverst@online.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).