summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2011-06-30 08:22:56 +0000
committerNils Wallménius <nils@rockbox.org>2011-06-30 08:22:56 +0000
commit4a04c47a97517930b29f00b9d7f4d157cb69fa9b (patch)
treee00f56df0810b8eea7b53a312c5cbc11af1c1fc4
parented0f1aec5db4ca244d54c752502bbf8ca73925dc (diff)
downloadrockbox-4a04c47a97517930b29f00b9d7f4d157cb69fa9b.tar.gz
rockbox-4a04c47a97517930b29f00b9d7f4d157cb69fa9b.tar.bz2
rockbox-4a04c47a97517930b29f00b9d7f4d157cb69fa9b.zip
Relax constraints for arm asm to not break when gcc decides to not inline the function but also throw in a FORCE_INLINE for good measure. Remove a redundant 'inline'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30103 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/fracmul.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/fracmul.h b/apps/fracmul.h
index 624b5de794..6aaedaf3e6 100644
--- a/apps/fracmul.h
+++ b/apps/fracmul.h
@@ -37,7 +37,7 @@ static inline int32_t FRACMUL(int32_t x, int32_t y)
* bits after a shift left by the constant z. NOTE: Only works for shifts of
* 1 to 8 on Coldfire!
*/
-static inline FORCE_INLINE int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)
+static FORCE_INLINE int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)
{
int32_t t, t2;
asm ("mac.l %[a], %[b], %%acc0\n\t"
@@ -73,7 +73,7 @@ static inline int32_t FRACMUL(int32_t x, int32_t y)
/* Multiply two S.31 fractional integers, and return the 32 most significant
* bits after a shift left by the constant z.
*/
-static inline int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)
+static FORCE_INLINE int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)
{
int32_t t, t2;
asm ("smull %[t], %[t2], %[a], %[b]\n\t"
@@ -81,7 +81,7 @@ static inline int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)
"orr %[t], %[t2], %[t], lsr %[d]\n\t"
: [t] "=&r" (t), [t2] "=&r" (t2)
: [a] "r" (x), [b] "r" (y),
- [c] "M" ((z) + 1), [d] "M" (31 - (z)));
+ [c] "Mr" ((z) + 1), [d] "Mr" (31 - (z)));
return t;
}