qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Darwin asm fix
@ 2004-01-20 19:27 Pierre d'Herbemont
  2004-01-20 19:49 ` Jocelyn Mayer
  2004-01-20 20:18 ` Gwenole Beauchesne
  0 siblings, 2 replies; 7+ messages in thread
From: Pierre d'Herbemont @ 2004-01-20 19:27 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

Hi!

This other patch fix the compilation of op.c under darwin. The changed 
line is in exec-all.h, and it is related to the different syntax used 
in linux and darwin's ld. In this case Darwin's ld wants '.data' 
whereas Linux's ld expects '.section ".data"'.

Thanks for your work on qemu!

Pierre

[-- Attachment #2: qemuasm.diff.txt --]
[-- Type: text/plain, Size: 1545 bytes --]

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	20 Jan 2004 19:23:10 -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];

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <C80BF812-4C4D-11D8-89C1-000A2796D230@free.fr>]

end of thread, other threads:[~2004-01-21 20:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20 19:27 [Qemu-devel] [PATCH] Darwin asm fix Pierre d'Herbemont
2004-01-20 19:49 ` Jocelyn Mayer
2004-01-20 20:11   ` Daniel Jacobowitz
2004-01-20 20:45     ` Jocelyn Mayer
2004-01-20 22:53       ` Michael L Torrie
2004-01-20 20:18 ` Gwenole Beauchesne
     [not found] <C80BF812-4C4D-11D8-89C1-000A2796D230@free.fr>
2004-01-21 20:30 ` Pierre d'Herbemont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).