diff options
author | Martin Storsjö <martin@martin.st> | 2015-12-30 23:46:06 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-01-07 09:33:24 +0200 |
commit | 26ec75aec3576daea691dee53a78ec67c0dc4040 (patch) | |
tree | 85455196d7b386dc38ef3542173c48af3ae4b3b5 /tests/checkasm/checkasm.c | |
parent | fa463aa83a4920b0eed47ad1f79775dfc53d21ec (diff) | |
download | ffmpeg-26ec75aec3576daea691dee53a78ec67c0dc4040.tar.gz |
checkasm: Check register clobbering on arm
Use two separate functions, depending on whether VFP/NEON is available.
This is set to require armv5te - it uses blx, which is only available
since armv5t, but we don't have a separate configure item for that.
(It also uses ldrd, which requires armv5te, but this could be avoided
if necessary.)
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests/checkasm/checkasm.c')
-rw-r--r-- | tests/checkasm/checkasm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index d6f8ffc842..c75e431d50 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -53,6 +53,12 @@ #define isatty(fd) 1 #endif +#if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL +#include "libavutil/arm/cpu.h" + +void (*checkasm_checked_call)(void *func, int dummy, ...) = checkasm_checked_call_novfp; +#endif + /* List of tests to invoke */ static const struct { const char *name; @@ -463,6 +469,11 @@ int main(int argc, char *argv[]) { int i, seed, ret = 0; +#if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL + if (have_vfp(av_get_cpu_flags()) || have_neon(av_get_cpu_flags())) + checkasm_checked_call = checkasm_checked_call_vfp; +#endif + if (!tests[0].func || !cpus[0].flag) { fprintf(stderr, "checkasm: no tests to perform\n"); return 0; |