summaryrefslogtreecommitdiffstats
path: root/firmware/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/system.h')
-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)
result[ 7.. 0] = value[31..24];
*/
{
- return SWAB16(SWAW32(SWAB16(value)));
+ asm volatile ("swap.b\t%0,%0\n"
+ "swap.w\t%0,%0\n"
+ "swap.b\t%0,%0\n" : "+r"(value));
+ return value;
}
/* Test And Set - UNTESTED */