Commit 75913b727e2702b7ee3099c0388502778554f681

Authored by bellard
1 parent ecada8a2

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
Showing 1 changed file with 7 additions and 3 deletions
exec-all.h
... ... @@ -320,13 +320,16 @@ TranslationBlock *tb_find_pc(unsigned long pc_ptr);
320 320 #define ASM_PREVIOUS_SECTION ".previous\n"
321 321 #endif
322 322  
  323 +#define ASM_OP_LABEL_NAME(n, opname) \
  324 + ASM_NAME(__op_label) #n "." ASM_NAME(opname)
  325 +
323 326 #if defined(__powerpc__)
324 327  
325 328 /* we patch the jump instruction directly */
326 329 #define GOTO_TB(opname, tbparam, n)\
327 330 do {\
328 331 asm volatile (ASM_DATA_SECTION\
329   - ASM_NAME(__op_label) #n "." ASM_NAME(opname) ":\n"\
  332 + ASM_OP_LABEL_NAME(n, opname) ":\n"\
330 333 ".long 1f\n"\
331 334 ASM_PREVIOUS_SECTION \
332 335 "b " ASM_NAME(__op_jmp) #n "\n"\
... ... @@ -339,7 +342,7 @@ do {\
339 342 #define GOTO_TB(opname, tbparam, n)\
340 343 do {\
341 344 asm volatile (".section .data\n"\
342   - ASM_NAME(__op_label) #n "." ASM_NAME(opname) ":\n"\
  345 + ASM_OP_LABEL_NAME(n, opname) ":\n"\
343 346 ".long 1f\n"\
344 347 ASM_PREVIOUS_SECTION \
345 348 "jmp " ASM_NAME(__op_jmp) #n "\n"\
... ... @@ -353,7 +356,8 @@ do {\
353 356 #define GOTO_TB(opname, tbparam, n)\
354 357 do {\
355 358 static void __attribute__((unused)) *dummy ## n = &&dummy_label ## n;\
356   - static void __attribute__((unused)) *__op_label ## n = &&label ## n;\
  359 + static void __attribute__((unused)) *__op_label ## n \
  360 + __asm__(ASM_OP_LABEL_NAME(n, opname)) = &&label ## n;\
357 361 goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n]);\
358 362 label ## n: ;\
359 363 dummy_label ## n: ;\
... ...