diff options
author | Nils Wallménius <nils@rockbox.org> | 2010-06-17 16:01:20 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2010-06-17 16:01:20 +0000 |
commit | b6c17c2c82602723a033298fafbc37b9462a9f34 (patch) | |
tree | 2949861d94fe4e34405851921c4744355fe7c689 /apps/codecs | |
parent | 10719ef6490df6998ca62f768a8ba9b1f1c6d616 (diff) | |
download | rockbox-b6c17c2c82602723a033298fafbc37b9462a9f34.tar.gz rockbox-b6c17c2c82602723a033298fafbc37b9462a9f34.zip |
Delete some duplicate inline asm macros since they now live in the codeclib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26891 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/libtremor/asm_arm.h | 44 | ||||
-rw-r--r-- | apps/codecs/libtremor/asm_mcf5249.h | 64 |
2 files changed, 0 insertions, 108 deletions
diff --git a/apps/codecs/libtremor/asm_arm.h b/apps/codecs/libtremor/asm_arm.h index 95f3bef0fc..ada0604a3a 100644 --- a/apps/codecs/libtremor/asm_arm.h +++ b/apps/codecs/libtremor/asm_arm.h | |||
@@ -43,50 +43,6 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { | |||
43 | return(hi); | 43 | return(hi); |
44 | } | 44 | } |
45 | 45 | ||
46 | #define XPROD32(a, b, t, v, x, y) \ | ||
47 | { \ | ||
48 | long l; \ | ||
49 | asm( "smull %0, %1, %4, %6\n\t" \ | ||
50 | "rsb %3, %4, #0\n\t" \ | ||
51 | "smlal %0, %1, %5, %7\n\t" \ | ||
52 | "smull %0, %2, %5, %6\n\t" \ | ||
53 | "smlal %0, %2, %3, %7" \ | ||
54 | : "=&r" (l), "=&r" (x), "=&r" (y), "=r" ((a)) \ | ||
55 | : "3" ((a)), "r" ((b)), "r" ((t)), "r" ((v)) ); \ | ||
56 | } | ||
57 | |||
58 | static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, | ||
59 | ogg_int32_t t, ogg_int32_t v, | ||
60 | ogg_int32_t *x, ogg_int32_t *y) | ||
61 | { | ||
62 | int x1, y1, l; | ||
63 | asm( "smull %0, %1, %4, %6\n\t" | ||
64 | "rsb %3, %4, #0\n\t" | ||
65 | "smlal %0, %1, %5, %7\n\t" | ||
66 | "smull %0, %2, %5, %6\n\t" | ||
67 | "smlal %0, %2, %3, %7" | ||
68 | : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) | ||
69 | : "3" (a), "r" (b), "r" (t), "r" (v) ); | ||
70 | *x = x1 << 1; | ||
71 | *y = y1 << 1; | ||
72 | } | ||
73 | |||
74 | static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, | ||
75 | ogg_int32_t t, ogg_int32_t v, | ||
76 | ogg_int32_t *x, ogg_int32_t *y) | ||
77 | { | ||
78 | int x1, y1, l; | ||
79 | asm( "smull %0, %1, %3, %5\n\t" | ||
80 | "rsb %2, %4, #0\n\t" | ||
81 | "smlal %0, %1, %2, %6\n\t" | ||
82 | "smull %0, %2, %4, %5\n\t" | ||
83 | "smlal %0, %2, %3, %6" | ||
84 | : "=&r" (l), "=&r" (x1), "=&r" (y1) | ||
85 | : "r" (a), "r" (b), "r" (t), "r" (v) ); | ||
86 | *x = x1 << 1; | ||
87 | *y = y1 << 1; | ||
88 | } | ||
89 | |||
90 | #ifndef _V_VECT_OPS | 46 | #ifndef _V_VECT_OPS |
91 | #define _V_VECT_OPS | 47 | #define _V_VECT_OPS |
92 | 48 | ||
diff --git a/apps/codecs/libtremor/asm_mcf5249.h b/apps/codecs/libtremor/asm_mcf5249.h index 224a861afd..e4f76ea411 100644 --- a/apps/codecs/libtremor/asm_mcf5249.h +++ b/apps/codecs/libtremor/asm_mcf5249.h | |||
@@ -70,70 +70,6 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { | |||
70 | return r; | 70 | return r; |
71 | } | 71 | } |
72 | 72 | ||
73 | |||
74 | static inline | ||
75 | void XPROD31(ogg_int32_t a, ogg_int32_t b, | ||
76 | ogg_int32_t t, ogg_int32_t v, | ||
77 | ogg_int32_t *x, ogg_int32_t *y) | ||
78 | { | ||
79 | asm volatile ("mac.l %[a], %[t], %%acc0;" | ||
80 | "mac.l %[b], %[v], %%acc0;" | ||
81 | "mac.l %[b], %[t], %%acc1;" | ||
82 | "msac.l %[a], %[v], %%acc1;" | ||
83 | "movclr.l %%acc0, %[a];" | ||
84 | "move.l %[a], (%[x]);" | ||
85 | "movclr.l %%acc1, %[a];" | ||
86 | "move.l %[a], (%[y]);" | ||
87 | : [a] "+&r" (a) | ||
88 | : [x] "a" (x), [y] "a" (y), | ||
89 | [b] "r" (b), [t] "r" (t), [v] "r" (v) | ||
90 | : "cc", "memory"); | ||
91 | } | ||
92 | |||
93 | |||
94 | static inline | ||
95 | void XNPROD31(ogg_int32_t a, ogg_int32_t b, | ||
96 | ogg_int32_t t, ogg_int32_t v, | ||
97 | ogg_int32_t *x, ogg_int32_t *y) | ||
98 | { | ||
99 | asm volatile ("mac.l %[a], %[t], %%acc0;" | ||
100 | "msac.l %[b], %[v], %%acc0;" | ||
101 | "mac.l %[b], %[t], %%acc1;" | ||
102 | "mac.l %[a], %[v], %%acc1;" | ||
103 | "movclr.l %%acc0, %[a];" | ||
104 | "move.l %[a], (%[x]);" | ||
105 | "movclr.l %%acc1, %[a];" | ||
106 | "move.l %[a], (%[y]);" | ||
107 | : [a] "+&r" (a) | ||
108 | : [x] "a" (x), [y] "a" (y), | ||
109 | [b] "r" (b), [t] "r" (t), [v] "r" (v) | ||
110 | : "cc", "memory"); | ||
111 | } | ||
112 | |||
113 | |||
114 | #if 0 /* canonical Tremor definition */ | ||
115 | #define XPROD32(_a, _b, _t, _v, _x, _y) \ | ||
116 | { (_x)=MULT32(_a,_t)+MULT32(_b,_v); \ | ||
117 | (_y)=MULT32(_b,_t)-MULT32(_a,_v); } | ||
118 | #endif | ||
119 | |||
120 | /* this could lose the LSB by overflow, but i don't think it'll ever happen. | ||
121 | if anyone think they can hear a bug caused by this, please try the above | ||
122 | version. */ | ||
123 | #define XPROD32(_a, _b, _t, _v, _x, _y) \ | ||
124 | asm volatile ("mac.l %[a], %[t], %%acc0;" \ | ||
125 | "mac.l %[b], %[v], %%acc0;" \ | ||
126 | "mac.l %[b], %[t], %%acc1;" \ | ||
127 | "msac.l %[a], %[v], %%acc1;" \ | ||
128 | "movclr.l %%acc0, %[x];" \ | ||
129 | "asr.l #1, %[x];" \ | ||
130 | "movclr.l %%acc1, %[y];" \ | ||
131 | "asr.l #1, %[y];" \ | ||
132 | : [x] "=&d" (_x), [y] "=&d" (_y) \ | ||
133 | : [a] "r" (_a), [b] "r" (_b), \ | ||
134 | [t] "r" (_t), [v] "r" (_v) \ | ||
135 | : "cc"); | ||
136 | |||
137 | #ifndef _V_VECT_OPS | 73 | #ifndef _V_VECT_OPS |
138 | #define _V_VECT_OPS | 74 | #define _V_VECT_OPS |
139 | 75 | ||