diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-03-29 05:30:25 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-03-29 05:30:25 +0000 |
commit | e754b16f4b64920d581b4eba90e776c7fd4b920b (patch) | |
tree | bce9172adef330b8eaca871705b1c25dbec61f6b /firmware/target | |
parent | 62e0a516a085de93ec0fc50cfff6e346d80ccebb (diff) | |
download | rockbox-e754b16f4b64920d581b4eba90e776c7fd4b920b.tar.gz rockbox-e754b16f4b64920d581b4eba90e776c7fd4b920b.zip |
Add an asm swap_odd_even32 to SH and ARM. Have the byteswapping functions take and return intxx_t data types.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12956 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/coldfire/system-target.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h index c707843af5..06589ae813 100644 --- a/firmware/target/coldfire/system-target.h +++ b/firmware/target/coldfire/system-target.h @@ -78,7 +78,7 @@ static inline int set_irq_level(int level) return oldlevel; } -static inline unsigned short swap16(unsigned short value) +static inline uint16_t swap16(uint16_t value) /* result[15..8] = value[ 7..0]; result[ 7..0] = value[15..8]; @@ -87,7 +87,7 @@ static inline unsigned short swap16(unsigned short value) return (value >> 8) | (value << 8); } -static inline unsigned long SWAW32(unsigned long value) +static inline uint32_t SWAW32(uint32_tg value) /* result[31..16] = value[15.. 0]; result[15.. 0] = value[31..16]; @@ -97,7 +97,7 @@ static inline unsigned long SWAW32(unsigned long value) return value; } -static inline unsigned long swap32(unsigned long value) +static inline uint32_t swap32(uint32_t value) /* result[31..24] = value[ 7.. 0]; result[23..16] = value[15.. 8]; @@ -105,7 +105,7 @@ static inline unsigned long swap32(unsigned long value) result[ 7.. 0] = value[31..24]; */ { - unsigned long mask = 0x00FF00FF; + uint32_t mask = 0x00FF00FF; asm ( /* val = ABCD */ "and.l %[val],%[mask] \n" /* mask = .B.D */ "eor.l %[mask],%[val] \n" /* val = A.C. */ @@ -120,7 +120,7 @@ static inline unsigned long swap32(unsigned long value) return value; } -static inline unsigned long swap_odd_even32(unsigned long value) +static inline uint32_t swap_odd_even32(uint32_t value) { /* result[31..24],[15.. 8] = value[23..16],[ 7.. 0] |