]> git.pld-linux.org Git - packages/qemu.git/blame - qemu-0.7.2-gcc4-opts.patch
- fix ncurses detection; enable mixemu; enable TLS in VNC support
[packages/qemu.git] / qemu-0.7.2-gcc4-opts.patch
CommitLineData
891bbdf5
AM
12005-11-11 Gwenole Beauchesne <gbeauchesne@mandriva.com>
2
3 * Globaaly save %ebx, %esi, %edi on entry to generated
4 function. This avoids some register spills in synthetic opcodes.
5 NOTE: this also easily fixes gcc4 compiled qemu-system-x86_64 on x86.
6
7--- qemu-0.7.2/cpu-exec.c.gcc4-opts 2005-09-04 19:11:31.000000000 +0200
8+++ qemu-0.7.2/cpu-exec.c 2005-11-11 17:40:47.000000000 +0100
9@@ -561,6 +561,15 @@ int cpu_exec(CPUState *env1)
10 : /* no outputs */
11 : "r" (gen_func)
12 : "r1", "r2", "r3", "r8", "r9", "r10", "r12", "r14");
13+#elif defined(TARGET_X86_64) && defined(__i386__)
14+ asm volatile ("push %%ebx\n"
15+ "push %%esi\n"
16+ "push %%edi\n"
17+ "call *%0\n"
18+ "pop %%edi\n"
19+ "pop %%esi\n"
20+ "pop %%ebx\n"
21+ : : "r" (gen_func) : "ebx", "esi", "edi");
22 #elif defined(TARGET_I386) && defined(USE_CODE_COPY)
23 {
24 if (!(tb->cflags & CF_CODE_COPY)) {
25--- qemu-0.7.2/Makefile.target.gcc4-opts 2005-11-11 16:26:33.000000000 +0100
26+++ qemu-0.7.2/Makefile.target 2005-11-11 17:59:56.000000000 +0100
27@@ -65,6 +65,10 @@ OP_CFLAGS+= -falign-functions=0 -fno-gcs
28 else
29 OP_CFLAGS+= -malign-functions=0
30 endif
31+ifeq ($(TARGET_ARCH), x86_64)
32+# XXX globally save %ebx, %esi, %edi on entry to generated function
33+OP_CFLAGS+= -fcall-used-ebx -fcall-used-esi -fcall-used-edi
34+endif
35
36 ifdef TARGET_GPROF
37 USE_I386_LD=y
This page took 0.035517 seconds and 4 git commands to generate.