diff options
author | RĂ©mi Denis-Courmont <remi@remlab.net> | 2022-10-06 22:15:41 +0300 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-10-10 02:23:18 +0200 |
commit | c962c78901d65b5416d63ffbadcc600628acd5b8 (patch) | |
tree | a89624064a72a079fed1c9c001e2d89b8e9c6c48 /tests/checkasm/checkasm.h | |
parent | 105921251ab35b870887e0c7348016f4dff3ec5b (diff) | |
download | ffmpeg-c962c78901d65b5416d63ffbadcc600628acd5b8.tar.gz |
checkasm: RISC-V 64-bit assembler test harness
Diffstat (limited to 'tests/checkasm/checkasm.h')
-rw-r--r-- | tests/checkasm/checkasm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index 97e909170f..ee9151410e 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -203,6 +203,16 @@ void checkasm_checked_call(void *func, ...); CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB),\ checked_call(func_new, 0, 0, 0, 0, 0, 0, 0, __VA_ARGS__,\ 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0)) +#elif ARCH_RISCV +void checkasm_set_function(void *); +void *checkasm_get_wrapper(void); + +#if (__riscv_xlen == 64) && defined (__riscv_d) +#define declare_new(ret, ...) \ + ret (*checked_call)(__VA_ARGS__) = checkasm_get_wrapper(); +#define call_new(...) \ + (checkasm_set_function(func_new), checked_call(__VA_ARGS__)) +#endif #else #define declare_new(ret, ...) #define declare_new_float(ret, ...) |