qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Patch] Swapping functions for Mac OS X
@ 2004-07-17 13:50 Pierre d'Herbemont
  2004-07-24 14:33 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre d'Herbemont @ 2004-07-17 13:50 UTC (permalink / raw)
  To: Fabrice Bellard; +Cc: qemu-devel

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

Hi Fabrice,

I think it should be quite useful to use the swapping functions on Mac 
OS X. However I don't see a huge performance gain with this patch.

Thanks,

Pierre.

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

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	17 Jul 2004 13:47:35 -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) \

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-28  1:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-17 13:50 [Qemu-devel] [Patch] Swapping functions for Mac OS X Pierre d'Herbemont
2004-07-24 14:33 ` Benjamin Herrenschmidt
2004-07-26 17:48   ` stegefin
2004-07-26 21:00     ` Laurent Amon
2004-07-28  1:13     ` Benjamin Herrenschmidt

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).