summaryrefslogtreecommitdiff
path: root/sim/byteswap.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2006-02-16 02:40:04 -0500
committerKorey Sewell <ksewell@umich.edu>2006-02-16 02:40:04 -0500
commite7d16b0aefec6543817762b6e5e389372a11b53c (patch)
tree2e90bf447049ece5fb234bfaf44c50515388744e /sim/byteswap.hh
parent7c9ea671aff141bc0a3e7acc892794e7e8181cf3 (diff)
parent00f451cc02373a22023f1e32ba3823a1d07adb42 (diff)
downloadgem5-e7d16b0aefec6543817762b6e5e389372a11b53c.tar.xz
Merge zizzer:/bk/multiarch
into zazzer.eecs.umich.edu:/z/ksewell/research/m5-sim/m5-multiarch --HG-- extra : convert_revision : 17b164847aee7e21d15d1a9d99aae43f46906c28
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;}