aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/checkasm.h
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi@remlab.net>2023-12-05 17:54:26 +0200
committerRémi Denis-Courmont <remi@remlab.net>2023-12-08 17:21:09 +0200
commitb3825bbe452c8e4f129fa90bba1fed0ee7b87d71 (patch)
tree022ae13a579e7e282a307e009e7ce983aa2704f9 /tests/checkasm/checkasm.h
parent0b9d009b4a85be31ed8ba1a9cece3b2db3e4d2f3 (diff)
downloadffmpeg-b3825bbe452c8e4f129fa90bba1fed0ee7b87d71.tar.gz
riscv: test for assembler support
This should fix the build on LLVM 16 and earlier, at the cost of turning all non-RVV optimisations off.
Diffstat (limited to 'tests/checkasm/checkasm.h')
-rw-r--r--tests/checkasm/checkasm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 11d2f7286f..749073d946 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -217,7 +217,7 @@ void checkasm_set_function(void *, sigjmp_buf);
void *checkasm_get_wrapper(void);
void checkasm_handle_signal(int signum);
-#if (__riscv_xlen == 64) && defined (__riscv_d)
+#if HAVE_RV && (__riscv_xlen == 64) && defined (__riscv_d)
#define declare_new(ret, ...) \
int checked_call_signum = 0; \
sigjmp_buf checked_call_jb; \
@@ -227,6 +227,9 @@ void checkasm_handle_signal(int signum);
(checked_call_signum = sigsetjmp(checked_call_jb, 1)) == 0 \
? checked_call(__VA_ARGS__) \
: (checkasm_fail_signal(checked_call_signum), 0))
+#else
+#define declare_new(ret, ...)
+#define call_new(...) ((func_type *)func_new)(__VA_ARGS__)
#endif
#else
#define declare_new(ret, ...)