Index: exec-all.h =================================================================== RCS file: /cvsroot/qemu/qemu/exec-all.h,v retrieving revision 1.9 diff -u -r1.9 exec-all.h --- exec-all.h 18 Jan 2004 22:44:01 -0000 1.9 +++ exec-all.h 21 Jan 2004 20:11:34 -0000 @@ -295,10 +295,16 @@ #if defined(__powerpc__) +# ifdef __APPLE__ +# define DATA_SECTION ".data\n" +# else /* __APPLE__ */ +# define DATA_SECTION ".section \".data\"\n" +# endif /* __APPLE__ */ + /* we patch the jump instruction directly */ #define JUMP_TB(opname, tbparam, n, eip)\ do {\ - asm volatile (".section \".data\"\n"\ + asm volatile ( DATA_SECTION \ "__op_label" #n "." stringify(opname) ":\n"\ ".long 1f\n"\ ".previous\n"\ @@ -319,7 +325,7 @@ /* we patch the jump instruction directly */ #define JUMP_TB(opname, tbparam, n, eip)\ do {\ - asm volatile (".section \".data\"\n"\ + asm volatile ( DATA_SECTION \ "__op_label" #n "." stringify(opname) ":\n"\ ".long 1f\n"\ ".previous\n"\ @@ -335,7 +341,8 @@ asm volatile ("jmp __op_jmp" #n "\n");\ } while (0) -#else +# undef DATA_SECTION +#else /* __powerpc__ */ /* jump to next block operations (more portable code, does not need cache flushing, but slower because of indirect jump) */ @@ -357,7 +364,7 @@ goto *(void *)(((TranslationBlock *)tbparam)->tb_next[n - 2]);\ } while (0) -#endif +#endif /* __powerpc__ */ extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; @@ -367,11 +374,11 @@ { int ret; __asm__ __volatile__ ( - "0: lwarx %0,0,%1 ;" - " xor. %0,%3,%0;" - " bne 1f;" - " stwcx. %2,0,%1;" - " bne- 0b;" + "0: lwarx %0,0,%1\n" + " xor. %0,%3,%0\n" + " bne 1f\n" + " stwcx. %2,0,%1\n" + " bne- 0b\n" "1: " : "=&r" (ret) : "r" (p), "r" (1), "r" (0)