summaryrefslogtreecommitdiff
path: root/firmware/target/sh
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-02-25 00:46:39 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-02-25 00:46:39 +0000
commit9f0bad0efe46237c18d7fb7074bdc60afc42c2ca (patch)
tree2a17724b3fee596dcc60b1a382d9f43a189b8fd9 /firmware/target/sh
parent93b1b8e15875e05d5df478194aef19a6bd69a08d (diff)
downloadrockbox-9f0bad0efe46237c18d7fb7074bdc60afc42c2ca.tar.gz
rockbox-9f0bad0efe46237c18d7fb7074bdc60afc42c2ca.zip
Byteswap routines don't really need 'asm volatile', just 'asm' since it should be safe to move them for optimizing. Clean up the line endings for ARM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29394 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/sh')
-rw-r--r--firmware/target/sh/system-target.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/target/sh/system-target.h b/firmware/target/sh/system-target.h
index 1693a132a6..d78c0587fc 100644
--- a/firmware/target/sh/system-target.h
+++ b/firmware/target/sh/system-target.h
@@ -84,7 +84,7 @@ static inline uint16_t swap16_hw(uint16_t value)
84 */ 84 */
85{ 85{
86 uint16_t result; 86 uint16_t result;
87 asm volatile ("swap.b\t%1,%0" : "=r"(result) : "r"(value)); 87 asm ("swap.b\t%1,%0" : "=r"(result) : "r"(value));
88 return result; 88 return result;
89} 89}
90 90
@@ -95,7 +95,7 @@ static inline uint32_t swaw32_hw(uint32_t value)
95 */ 95 */
96{ 96{
97 uint32_t result; 97 uint32_t result;
98 asm volatile ("swap.w\t%1,%0" : "=r"(result) : "r"(value)); 98 asm ("swap.w\t%1,%0" : "=r"(result) : "r"(value));
99 return result; 99 return result;
100} 100}
101 101
@@ -107,9 +107,9 @@ static inline uint32_t swap32_hw(uint32_t value)
107 result[ 7.. 0] = value[31..24]; 107 result[ 7.. 0] = value[31..24];
108 */ 108 */
109{ 109{
110 asm volatile ("swap.b\t%0,%0\n" 110 asm ("swap.b\t%0,%0\n"
111 "swap.w\t%0,%0\n" 111 "swap.w\t%0,%0\n"
112 "swap.b\t%0,%0\n" : "+r"(value)); 112 "swap.b\t%0,%0\n" : "+r"(value));
113 return value; 113 return value;
114} 114}
115 115
@@ -119,10 +119,10 @@ static inline uint32_t swap_odd_even32_hw(uint32_t value)
119 result[31..24],[15.. 8] = value[23..16],[ 7.. 0] 119 result[31..24],[15.. 8] = value[23..16],[ 7.. 0]
120 result[23..16],[ 7.. 0] = value[31..24],[15.. 8] 120 result[23..16],[ 7.. 0] = value[31..24],[15.. 8]
121 */ 121 */
122 asm volatile ("swap.b\t%0,%0\n" 122 asm ("swap.b\t%0,%0\n"
123 "swap.w\t%0,%0\n" 123 "swap.w\t%0,%0\n"
124 "swap.b\t%0,%0\n" 124 "swap.b\t%0,%0\n"
125 "swap.w\t%0,%0\n" : "+r"(value)); 125 "swap.w\t%0,%0\n" : "+r"(value));
126 return value; 126 return value;
127} 127}
128 128