comparison internal.h @ 675:361d5a76087d libavutil

ARM: disable inline asm for armcc
author mru
date Thu, 05 Mar 2009 21:20:13 +0000
parents 86393a769260
children b386bd0fad52
comparison
equal deleted inserted replaced
674:d27f2ec2810b 675:361d5a76087d
132 :"=d"(ret),"=a"(dmy)\ 132 :"=d"(ret),"=a"(dmy)\
133 :"1"(a),"g"(ff_inverse[b])\ 133 :"1"(a),"g"(ff_inverse[b])\
134 );\ 134 );\
135 ret;\ 135 ret;\
136 }) 136 })
137 #elif HAVE_ARMV6 137 #elif HAVE_ARMV6 && HAVE_INLINE_ASM
138 static inline av_const int FASTDIV(int a, int b) 138 static inline av_const int FASTDIV(int a, int b)
139 { 139 {
140 int r, t; 140 int r, t;
141 __asm__ volatile("cmp %3, #2 \n\t" 141 __asm__ volatile("cmp %3, #2 \n\t"
142 "ldr %1, [%4, %3, lsl #2] \n\t" 142 "ldr %1, [%4, %3, lsl #2] \n\t"
143 "lsrle %0, %2, #1 \n\t" 143 "lsrle %0, %2, #1 \n\t"
144 "smmulgt %0, %1, %2 \n\t" 144 "smmulgt %0, %1, %2 \n\t"
145 : "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse)); 145 : "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
146 return r; 146 return r;
147 } 147 }
148 #elif ARCH_ARM 148 #elif ARCH_ARM && HAVE_INLINE_ASM
149 static inline av_const int FASTDIV(int a, int b) 149 static inline av_const int FASTDIV(int a, int b)
150 { 150 {
151 int r, t; 151 int r, t;
152 __asm__ volatile ("umull %1, %0, %2, %3" 152 __asm__ volatile ("umull %1, %0, %2, %3"
153 : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b])); 153 : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));