summaryrefslogtreecommitdiff
path: root/libavutil/cpu.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2015-12-09 22:28:36 +0100
committerJanne Grunau <janne-libav@jannau.net>2015-12-14 16:42:35 +0100
commite2710e790c09e49e86baa58c6063af0097cc8cb0 (patch)
tree4bf42a3192ea353305d8409d085522100a16b350 /libavutil/cpu.c
parent5dfe4edad63971d669ae456b0bc40ef9364cca80 (diff)
arm: add a cpu flag for the VFPv2 vector mode
The vector mode was deprecated in ARMv7-A/VFPv3 and various cpu implementations do not support it in hardware. Vector mode code will depending the OS either be emulated in software or result in an illegal instruction on cpus which does not support it. This was not really problem in practice since NEON implementations of the same functions are preferred. It will however become a problem for checkasm which tests every cpu flag separately. Since this is a cpu feature newer cpu do not support anymore the behaviour of this flag differs from the other flags. It can be only activated by runtime cpu feature selection.
Diffstat (limited to 'libavutil/cpu.c')
-rw-r--r--libavutil/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index e24b9dd679..5f04461f6b 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -124,6 +124,7 @@ int av_parse_cpu_flags(const char *s)
{ "armv6", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV6 }, .unit = "flags" },
{ "armv6t2", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ARMV6T2 }, .unit = "flags" },
{ "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" },
+ { "vfp_vm", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP_VM }, .unit = "flags" },
{ "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .unit = "flags" },
{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" },
#elif ARCH_AARCH64
@@ -204,6 +205,7 @@ static const struct {
{ AV_CPU_FLAG_ARMV6, "armv6" },
{ AV_CPU_FLAG_ARMV6T2, "armv6t2" },
{ AV_CPU_FLAG_VFP, "vfp" },
+ { AV_CPU_FLAG_VFP_VM, "vfp_vm" },
{ AV_CPU_FLAG_VFPV3, "vfpv3" },
{ AV_CPU_FLAG_NEON, "neon" },
#elif ARCH_PPC