846f57bf93
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@591 6952d904-891a-0410-993b-d76249ca496b
58 lines
2.3 KiB
Diff
58 lines
2.3 KiB
Diff
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
#
|
|
# T2 SDE: package/.../qemu/qemu-0.9.1-gcc4-opts.patch
|
|
# Copyright (C) 2008 The T2 SDE Project
|
|
#
|
|
# More information can be found in the files COPYING and README.
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
# --- T2-COPYRIGHT-NOTE-END ---
|
|
|
|
2008-01-12 Mike Kronenberg <mike.kronenberg@kronenberg.org>
|
|
|
|
* cpu-exec.c: Fix for QEMU 0.9.1.
|
|
|
|
2005-11-11 Gwenole Beauchesne <gbeauchesne@mandriva.com>
|
|
|
|
* Globaaly save %ebx, %esi, %edi on entry to generated
|
|
function. This avoids some register spills in synthetic opcodes.
|
|
NOTE: this also easily fixes gcc4 compiled qemu-system-x86_64 on x86.
|
|
|
|
--- qemu-0.7.2/cpu-exec.c.gcc4-opts 2005-09-04 19:11:31.000000000 +0200
|
|
+++ qemu-0.7.2/cpu-exec.c 2005-11-11 17:40:47.000000000 +0100
|
|
@@ -561,6 +561,15 @@ int cpu_exec(CPUState *env1)
|
|
: /* no outputs */
|
|
: "r" (gen_func)
|
|
: "r1", "r2", "r3", "r8", "r9", "r10", "r12", "r14");
|
|
+#elif defined(TARGET_X86_64) && defined(__i386__)
|
|
+ asm volatile ("push %%ebx\n"
|
|
+ "push %%esi\n"
|
|
+ "push %%edi\n"
|
|
+ "call *%0\n"
|
|
+ "pop %%edi\n"
|
|
+ "pop %%esi\n"
|
|
+ "pop %%ebx\n"
|
|
+ : : "r" (gen_func) : "ebx", "esi", "edi");
|
|
#elif defined(__ia64)
|
|
struct fptr {
|
|
void *ip;
|
|
--- qemu-0.7.2/Makefile.target.gcc4-opts 2005-11-11 16:26:33.000000000 +0100
|
|
+++ qemu-0.7.2/Makefile.target 2005-11-11 17:59:56.000000000 +0100
|
|
@@ -65,6 +65,10 @@ OP_CFLAGS+= -falign-functions=0 -fno-gcs
|
|
else
|
|
OP_CFLAGS+= -malign-functions=0
|
|
endif
|
|
+ifeq ($(TARGET_ARCH), x86_64)
|
|
+# XXX globally save %ebx, %esi, %edi on entry to generated function
|
|
+OP_CFLAGS+= -fcall-used-ebx -fcall-used-esi -fcall-used-edi
|
|
+endif
|
|
|
|
ifdef TARGET_GPROF
|
|
USE_I386_LD=y
|