Patchwork [uq/master,3/5] introduce leul_to_cpu

login
register
mail settings
Submitter Marcelo Tosatti
Date April 23, 2010, 5:04 p.m.
Message ID <20100423170645.900109068@amt.cnet>
Download mbox | patch
Permalink /patch/50853/
State New
Headers show

Comments

Marcelo Tosatti - April 23, 2010, 5:04 p.m.
To be used by next patch.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Patch

Index: qemu-memslot/bswap.h
===================================================================
--- qemu-memslot.orig/bswap.h
+++ qemu-memslot/bswap.h
@@ -205,8 +205,10 @@  static inline void cpu_to_be32wu(uint32_
 
 #ifdef HOST_WORDS_BIGENDIAN
 #define cpu_to_32wu cpu_to_be32wu
+#define leul_to_cpu(v) le ## HOST_LONG_BITS ## _to_cpu(v)
 #else
 #define cpu_to_32wu cpu_to_le32wu
+#define leul_to_cpu(v) (v)
 #endif
 
 #undef le_bswap