diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-03-17 14:23:48 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-03-17 14:23:48 -0500 |
commit | cf2f7e13bc26b8817f4378701b8fb5f7c67b3da2 (patch) | |
tree | 805f0617a04dd2c265e3ab451f5177c359a169e0 /sim | |
parent | cf942425393dbd7ac3d05a9c94aab5140d0bf617 (diff) | |
parent | c1a1f8ee95a6ed644838db06474801ba4b7bf124 (diff) | |
download | gem5-cf2f7e13bc26b8817f4378701b8fb5f7c67b3da2.tar.xz |
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem
arch/sparc/isa/decoder.isa:
Hand merged
--HG--
extra : convert_revision : 5d5338602c48be48978972a091c5e93f9dd775aa
Diffstat (limited to 'sim')
-rw-r--r-- | sim/byteswap.hh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sim/byteswap.hh b/sim/byteswap.hh index cec11f15e..0dd0ba827 100644 --- a/sim/byteswap.hh +++ b/sim/byteswap.hh @@ -79,11 +79,13 @@ 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__) +//This is to prevent the following two functions from compiling on +//64bit machines. It won't detect everything, so it should be changed. +#ifndef __x86_64__ 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 +#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;} |