diff options
author | Henrik Gramner <gramner@twoorioles.com> | 2021-08-12 14:09:14 +0300 |
---|---|---|
committer | Henrik Gramner <gramner@twoorioles.com> | 2021-08-13 17:35:49 +0300 |
commit | 878e16693bed5a9e8e6e7c401ccaf9d72e26386b (patch) | |
tree | 8518a4b3b220879857db9cfe5ab73edb97adc428 /tests | |
parent | a900eb3184c9e490a09ac7467732461829bba202 (diff) |
checkasm: Prefer calling function through checked_call()
Improves detection of register preservation issues etc.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/checkasm/checkasm.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index 0d6307d..5faa769 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -282,9 +282,9 @@ void checkasm_stack_clobber(uint64_t clobber, ...); #ifdef readtime #define bench_new(...)\ do {\ - func_type *tfunc = func_new;\ - checkasm_set_signal_handler_state(1);\ if (checkasm_bench_func()) {\ + func_type *tfunc = func_new;\ + checkasm_set_signal_handler_state(1);\ uint64_t tsum = 0;\ int tcount = 0;\ for (int ti = 0; ti < BENCH_RUNS; ti++) {\ @@ -299,11 +299,11 @@ void checkasm_stack_clobber(uint64_t clobber, ...); tcount++;\ }\ }\ + checkasm_set_signal_handler_state(0);\ checkasm_update_bench(tcount, tsum);\ } else {\ - tfunc(__VA_ARGS__);\ + call_new(__VA_ARGS__);\ }\ - checkasm_set_signal_handler_state(0);\ } while (0) #else #define bench_new(...) do {} while (0) |