From c91d6a33f872574c95c8784277cf60ffcf6bff4f Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 30 Sep 2016 12:06:49 +0300 Subject: checkasm: aarch64: Add filler args to make sure all parameters are passed on the stack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This, combined with clobbering the stack space prior to the call, increases the chances of finding cases where 32 bit parameters are erroneously treated as 64 bit. Signed-off-by: Martin Storsjö --- tests/checkasm/checkasm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/checkasm/checkasm.h') diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index 2defc7f905..75aa457572 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -136,11 +136,12 @@ extern void (*checkasm_checked_call)(void *func, int dummy, ...); #elif ARCH_AARCH64 && !defined(__APPLE__) void checkasm_stack_clobber(uint64_t clobber, ...); void checkasm_checked_call(void *func, ...); -#define declare_new(ret, ...) ret (*checked_call)(void *, __VA_ARGS__) = (void *)checkasm_checked_call; +#define declare_new(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, int, int, __VA_ARGS__)\ + = (void *)checkasm_checked_call; #define CLOB (UINT64_C(0xdeadbeefdeadbeef)) #define call_new(...) (checkasm_stack_clobber(CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,\ CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB),\ - checked_call(func_new, __VA_ARGS__)) + checked_call(func_new, 0, 0, 0, 0, 0, 0, 0, __VA_ARGS__)) #else #define declare_new(ret, ...) #define declare_new_emms(cpu_flags, ret, ...) -- cgit v1.2.3