[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch] gcc4 host support
From: |
Filip Navara |
Subject: |
Re: [Qemu-devel] [patch] gcc4 host support |
Date: |
Sat, 14 May 2005 09:55:11 +0200 |
User-agent: |
Mozilla Thunderbird 0.9 (Windows/20041103) |
Paul Brook wrote:
On Wednesday 11 May 2005 22:04, Paul Brook wrote:
The attached patch adds support for gcc4 x86 and x86_64 hosts.
This time with the correct patch attached.
Paul
In addition to this patch I also needed the attached patch to get MinGW
GCC 3.4.1 builds working...
- Filip
--- dyngen.c Sat May 14 09:48:34 2005
+++ dyngen.c Sat May 14 09:37:13 2005
@@ -2255,7 +2255,8 @@ void gen_code(const char *name, host_ulo
for(i = 0, sym = symtab; i < nb_syms; i++, sym++) {
sym_name = get_sym_name(sym);
- if (strstart(sym_name, "__op_label", &p)) {
+ if (strstart(sym_name, "__op_label", &p) ||
+ strstart(sym_name, "_op_label", &p)) {
uint8_t *ptr;
unsigned long offset;
--- exec-all.h Sat May 14 09:48:34 2005
+++ exec-all.h Sat May 14 09:37:04 2005
@@ -349,12 +349,20 @@ do {\
#else
+#if __GNUC__ == 3 && __GNUC_MINOR__ < 4
+#define UNUSED __attribute__((unused))
+#elif defined(__GNUC__)
+#define UNUSED __attribute__((used))
+#else
+#define UNUSED
+#endif
+
/* jump to next block operations (more portable code, does not need
cache flushing, but slower because of indirect jump) */
#define GOTO_TB(opname, tbparam, n)\
do {\
- static void __attribute__((unused)) *dummy ## n = &&dummy_label ## n;\
- static void __attribute__((unused)) *__op_label ## n = &&label ## n;\
+ static void UNUSED *dummy ## n = &&dummy_label ## n;\
+ static void UNUSED *__op_label ## n = &&label ## n;\
goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n]);\
label ## n: ;\
dummy_label ## n: ;\