arm: only enable setend on ARMv6
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 4 Jun 2015 21:07:44 +0000 (23:07 +0200)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 5 Jun 2015 15:14:10 +0000 (17:14 +0200)
Without this check it causes SIGILL crashes on ARMv5.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavutil/arm/cpu.c

index f1683e8d767c8acbba41025662f83f38ad916dff..02def0b4709bc7ae753633633dfc7fee68df7f86 100644 (file)
@@ -128,7 +128,7 @@ int ff_get_cpu_flags_arm(void)
        trickle down. */
     if (flags & (AV_CPU_FLAG_VFPV3 | AV_CPU_FLAG_NEON))
         flags |= AV_CPU_FLAG_ARMV6T2;
-    else
+    else if (flags & (AV_CPU_FLAG_ARMV6T2 | AV_CPU_FLAG_ARMV6))
     /* Some functions use the 'setend' instruction which is deprecated on ARMv8
      * and serializing on some ARMv7 cores. This ensures such functions
      * are only enabled on ARMv6. */