Browse code

pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used on armv4 that doesn't support this instruction. Futhermore pld is a nop on some armv5 processor like arm926. Detect if pld is supported and have the preprocessor remove it when it's not supported. Fixes issue 393. patch by matthieu castet, castet.matthieu free fr

Originally committed as revision 12569 to svn://svn.ffmpeg.org/ffmpeg/trunk

Matthieu Castet authored on 2008/03/24 20:49:59
Showing 2 changed files
... ...
@@ -748,6 +748,7 @@ HAVE_LIST="
748 748
     memalign
749 749
     mkstemp
750 750
     mlib
751
+    pld
751 752
     ppc64
752 753
     round
753 754
     roundf
... ...
@@ -1561,6 +1562,8 @@ int main(void) {
1561 1561
 EOF
1562 1562
 fi
1563 1563
 
1564
+# We have to check if pld is a nop and disable it.
1565
+enabled armv4l  && check_asm pld     '"pld [r0]"'
1564 1566
 enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
1565 1567
 enabled armv6   && check_asm armv6   '"sadd16 r0, r0, r0"'
1566 1568
 enabled iwmmxt  && check_asm iwmmxt  '"wunpckelub wr6, wr4"'
... ...
@@ -19,6 +19,13 @@
19 19
 @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
 @
21 21
 
22
+#include "config.h"
23
+
24
+#ifndef HAVE_PLD
25
+.macro pld reg
26
+.endm
27
+#endif
28
+
22 29
 .macro  ADJ_ALIGN_QUADWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
23 30
         mov \Rd0, \Rn0, lsr #(\shift * 8)
24 31
         mov \Rd1, \Rn1, lsr #(\shift * 8)