qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Inquiry, speed comparison on OS X, QEMU vs Virtual PC


From: Pierre d'Herbemont
Subject: Re: [Qemu-devel] Inquiry, speed comparison on OS X, QEMU vs Virtual PC
Date: Sat, 10 Jul 2004 15:27:37 +0200


Le 10 juil. 04, à 15:14, Fabrice Bellard a écrit :

Pierre d'Herbemont wrote:
I probably should add that the Mac OS X version that is avalaible for download doesn't include support for the PowerPC swapping instructions (little-endian storing and loading instructions). Next release will.

You mean that lwbrx is disabled for example ? I did not notice that in your patch.

byteswap.h is not present on Mac OS X. So if bswap.h is where you define the swapping functions, a fix like this is required:

Index: bswap.h
===================================================================
RCS file: /cvsroot/qemu/qemu/bswap.h,v
retrieving revision 1.3
diff -u -r1.3 bswap.h
--- bswap.h     21 Mar 2004 17:06:25 -0000      1.3
+++ bswap.h     10 Jul 2004 13:27:03 -0000
@@ -7,6 +7,11 @@

 #ifdef HAVE_BYTESWAP_H
 #include <byteswap.h>
+#elif defined(__APPLE__)
+#include <machine/byte_order.h>
+#define bswap_16(x) NXSwapShort(x)
+#define bswap_32(x) NXSwapInt(x)
+#define bswap_64(x) NXSwapLongLong(x)
 #else

 #define bswap_16(x) \





reply via email to

[Prev in Thread] Current Thread [Next in Thread]