Author: gb
Date: Sat Feb 3 09:18:55 2007
New Revision: 116056
Modified:
packages/cooker/qemu/current/SOURCES/qemu-0.8.3-x86_64-opts.patch
Log:
- x86_64 host improvements (+15% on nbench.flp)
Modified: packages/cooker/qemu/current/SOURCES/qemu-0.8.3-x86_64-opts.patch
==============================================================================
--- packages/cooker/qemu/current/SOURCES/qemu-0.8.3-x86_64-opts.patch
(original)
+++ packages/cooker/qemu/current/SOURCES/qemu-0.8.3-x86_64-opts.patch Sat Feb
3 09:18:55 2007
@@ -1,10 +1,14 @@
+2007-02-03 Gwenole Beauchesne <[EMAIL PROTECTED]>
+
+ * dyngen-exec.h (AREG4, AREG5): Enable when building with GCC4.
+
2005-06-04 Gwenole Beauchesne <[EMAIL PROTECTED]>
* Add direct jump support to x86-64.
---- qemu-0.7.0/exec-all.h.x86_64-direct-jump 2005-06-04 06:04:10.000000000
+0200
-+++ qemu-0.7.0/exec-all.h 2005-06-04 06:59:35.000000000 +0200
-@@ -153,6 +153,9 @@ int tlb_set_page(CPUState *env, target_u
+--- qemu-0.8.3/exec-all.h.x86_64-opts 2007-02-03 09:09:38.000000000 +0100
++++ qemu-0.8.3/exec-all.h 2007-02-03 09:09:38.000000000 +0100
+@@ -159,6 +159,9 @@ static inline int tlb_set_page(CPUState
#if defined(__i386__) && !defined(_WIN32)
#define USE_DIRECT_JUMP
#endif
@@ -14,7 +18,7 @@
typedef struct TranslationBlock {
target_ulong pc; /* simulated PC corresponding to this block (EIP + CS
base) */
-@@ -257,7 +260,7 @@ static inline void tb_set_jmp_target1(un
+@@ -245,7 +248,7 @@ static inline void tb_set_jmp_target1(un
asm volatile ("sync" : : : "memory");
asm volatile ("isync" : : : "memory");
}
@@ -23,7 +27,7 @@
static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long
addr)
{
/* patch the branch destination */
-@@ -333,7 +336,7 @@ do {\
+@@ -324,7 +327,7 @@ do {\
"1:\n");\
} while (0)
@@ -32,9 +36,9 @@
/* we patch the jump instruction directly. Use sti in place of the actual
jmp instruction so that dyngen can patch in the correct result. */
---- qemu-0.7.0/dyngen.c.x86_64-direct-jump 2005-06-04 06:04:10.000000000
+0200
-+++ qemu-0.7.0/dyngen.c 2005-06-04 06:44:01.000000000 +0200
-@@ -2549,6 +2549,17 @@ void gen_code(const char *name, host_ulo
+--- qemu-0.8.3/dyngen.c.x86_64-opts 2007-02-03 09:09:38.000000000 +0100
++++ qemu-0.8.3/dyngen.c 2007-02-03 09:09:38.000000000 +0100
+@@ -2766,6 +2766,17 @@ void gen_code(const char *name, host_ulo
if (rel->r_offset >= start_offset &&
rel->r_offset < start_offset + copy_size) {
sym_name = strtab +
symtab[ELFW(R_SYM)(rel->r_info)].st_name;
@@ -52,3 +56,19 @@
get_reloc_expr(name, sizeof(name), sym_name);
type = ELF32_R_TYPE(rel->r_info);
addend = rel->r_addend;
+--- qemu-0.8.3/dyngen-exec.h.x86_64-opts 2007-02-03 09:09:38.000000000
+0100
++++ qemu-0.8.3/dyngen-exec.h 2007-02-03 09:10:20.000000000 +0100
+@@ -92,8 +92,11 @@ extern int printf(const char *, ...);
+ #define AREG1 "rbx"
+ #define AREG2 "r12"
+ #define AREG3 "r13"
+-//#define AREG4 "r14"
+-//#define AREG5 "r15"
++#if __GNUC__ >= 4
++/* XXX: earlier GCC crashes */
++#define AREG4 "r14"
++#define AREG5 "r15"
++#endif
+ #endif
+ #ifdef __powerpc__
+ #define AREG0 "r27"