summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-05-09 23:00:14 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-05-09 23:00:14 +0000
commit18826d2c8364d4422ab1dbf07c842f98a688d99b (patch)
tree5eb85d7b9b4cec93ff40e12c9b049b3aa9e00c9c
parent01ede91cbec4befeee1b7ea936e14576e75e3a69 (diff)
downloadrockbox-18826d2c8364d4422ab1dbf07c842f98a688d99b.tar.gz
rockbox-18826d2c8364d4422ab1dbf07c842f98a688d99b.zip
SWAB32 is finally working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@529 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/system.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/system.h b/firmware/system.h
index 1191e59843..9b1df03217 100644
--- a/firmware/system.h
+++ b/firmware/system.h
@@ -194,7 +194,10 @@ static inline long SWAB32(long value)
194 result[ 7.. 0] = value[31..24]; 194 result[ 7.. 0] = value[31..24];
195 */ 195 */
196{ 196{
197 return SWAB16(SWAW32(SWAB16(value))); 197 asm volatile ("swap.b\t%0,%0\n"
198 "swap.w\t%0,%0\n"
199 "swap.b\t%0,%0\n" : "+r"(value));
200 return value;
198} 201}
199 202
200/* Test And Set - UNTESTED */ 203/* Test And Set - UNTESTED */