Commit 75913b72 authored by bellard's avatar bellard
Browse files

compilation fix for gcc3.4 on win32 (Paul Brook)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1557 c046a42c-6fe2-441c-8c8c-71466251a162
parent ecada8a2
...@@ -320,13 +320,16 @@ TranslationBlock *tb_find_pc(unsigned long pc_ptr); ...@@ -320,13 +320,16 @@ TranslationBlock *tb_find_pc(unsigned long pc_ptr);
#define ASM_PREVIOUS_SECTION ".previous\n" #define ASM_PREVIOUS_SECTION ".previous\n"
#endif #endif
#define ASM_OP_LABEL_NAME(n, opname) \
ASM_NAME(__op_label) #n "." ASM_NAME(opname)
#if defined(__powerpc__) #if defined(__powerpc__)
/* we patch the jump instruction directly */ /* we patch the jump instruction directly */
#define GOTO_TB(opname, tbparam, n)\ #define GOTO_TB(opname, tbparam, n)\
do {\ do {\
asm volatile (ASM_DATA_SECTION\ asm volatile (ASM_DATA_SECTION\
ASM_NAME(__op_label) #n "." ASM_NAME(opname) ":\n"\ ASM_OP_LABEL_NAME(n, opname) ":\n"\
".long 1f\n"\ ".long 1f\n"\
ASM_PREVIOUS_SECTION \ ASM_PREVIOUS_SECTION \
"b " ASM_NAME(__op_jmp) #n "\n"\ "b " ASM_NAME(__op_jmp) #n "\n"\
...@@ -339,7 +342,7 @@ do {\ ...@@ -339,7 +342,7 @@ do {\
#define GOTO_TB(opname, tbparam, n)\ #define GOTO_TB(opname, tbparam, n)\
do {\ do {\
asm volatile (".section .data\n"\ asm volatile (".section .data\n"\
ASM_NAME(__op_label) #n "." ASM_NAME(opname) ":\n"\ ASM_OP_LABEL_NAME(n, opname) ":\n"\
".long 1f\n"\ ".long 1f\n"\
ASM_PREVIOUS_SECTION \ ASM_PREVIOUS_SECTION \
"jmp " ASM_NAME(__op_jmp) #n "\n"\ "jmp " ASM_NAME(__op_jmp) #n "\n"\
...@@ -353,7 +356,8 @@ do {\ ...@@ -353,7 +356,8 @@ do {\
#define GOTO_TB(opname, tbparam, n)\ #define GOTO_TB(opname, tbparam, n)\
do {\ do {\
static void __attribute__((unused)) *dummy ## n = &&dummy_label ## n;\ static void __attribute__((unused)) *dummy ## n = &&dummy_label ## n;\
static void __attribute__((unused)) *__op_label ## n = &&label ## n;\ static void __attribute__((unused)) *__op_label ## n \
__asm__(ASM_OP_LABEL_NAME(n, opname)) = &&label ## n;\
goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n]);\ goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n]);\
label ## n: ;\ label ## n: ;\
dummy_label ## n: ;\ dummy_label ## n: ;\
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment