summaryrefslogtreecommitdiff
path: root/libavutil/arm
diff options
context:
space:
mode:
authorBen Avison <bavison@riscosopen.org>2014-07-21 14:53:06 +0100
committerDiego Biurrun <diego@biurrun.de>2014-07-21 15:08:01 -0700
commit6869612f5c7d4d2f20f69a5658328a761deadb1c (patch)
treec429c4f8267299bbcbeb5986cda008e7e1d74d64 /libavutil/arm
parent16e6652286213014c28a9c3af70435e767d28638 (diff)
arm: Macroize the test for 'setend' CPU instruction support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavutil/arm')
-rw-r--r--libavutil/arm/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/arm/cpu.h b/libavutil/arm/cpu.h
index 52e839c32e..224409afee 100644
--- a/libavutil/arm/cpu.h
+++ b/libavutil/arm/cpu.h
@@ -30,4 +30,10 @@
#define have_vfpv3(flags) CPUEXT(flags, VFPV3)
#define have_neon(flags) CPUEXT(flags, NEON)
+/* Some functions use the 'setend' instruction which is deprecated on ARMv8
+ * and serializing on some ARMv7 cores. This macro ensures such functions
+ * are only enabled on ARMv6. */
+#define have_setend(flags) \
+ (have_armv6(flags) && !(have_vfpv3(flags) || have_neon(flags)))
+
#endif /* AVUTIL_ARM_CPU_H */