diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/system.h | 5 |
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 */ |