summaryrefslogtreecommitdiff
path: root/sim/byteswap.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-15 23:24:35 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-15 23:24:35 -0500
commit7f17f1f2df7dc7123448ec624a345ee7c0e996b5 (patch)
treeb410a8b5e1b80e119cc374cb9d7822d46b274ef8 /sim/byteswap.hh
parentaee1bf58734c2146eb048dc4833881886ce68cf8 (diff)
parent2d04f186748c70b3d8afecd39b94436c33848d93 (diff)
downloadgem5-7f17f1f2df7dc7123448ec624a345ee7c0e996b5.tar.xz
Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/z/m5/Bitkeeper/multiarch --HG-- extra : convert_revision : b4bbf63ec3b1c6de0ea7220e6dda5366c0529c07
Diffstat (limited to 'sim/byteswap.hh')
-rw-r--r--sim/byteswap.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/sim/byteswap.hh b/sim/byteswap.hh
index c8e3694fe..c5d8801ab 100644
--- a/sim/byteswap.hh
+++ b/sim/byteswap.hh
@@ -79,6 +79,11 @@ static inline uint64_t swap_byte(uint64_t x) {return swap_byte64(x);}
static inline int64_t swap_byte(int64_t x) {return swap_byte64((uint64_t)x);}
static inline uint32_t swap_byte(uint32_t x) {return swap_byte32(x);}
static inline int32_t swap_byte(int32_t x) {return swap_byte32((uint32_t)x);}
+#if defined(__APPLE__)
+static inline long swap_byte(long x) {return swap_byte32((long)x);}
+static inline unsigned long swap_byte(unsigned long x)
+ { return swap_byte32((unsigned long)x);}
+#endif
static inline uint16_t swap_byte(uint16_t x) {return swap_byte32(x);}
static inline int16_t swap_byte(int16_t x) {return swap_byte16((uint16_t)x);}
static inline uint8_t swap_byte(uint8_t x) {return x;}