diff options
author | Martin Storsjö <martin@martin.st> | 2016-09-30 11:39:22 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-10-16 23:26:22 +0300 |
commit | f1b3e131385176c3c9d9783b25047856a0dcebf6 (patch) | |
tree | 50890d5f995440e8b530acb9297b853d729c90ae /tests/checkasm/checkasm.h | |
parent | a05cc56124b4f1237f6355784de821e3290ddb44 (diff) | |
download | ffmpeg-f1b3e131385176c3c9d9783b25047856a0dcebf6.tar.gz |
checkasm: aarch64: Clobber the stack before calling functions
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests/checkasm/checkasm.h')
-rw-r--r-- | tests/checkasm/checkasm.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index 5a4c056ce2..2defc7f905 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -134,9 +134,13 @@ extern void (*checkasm_checked_call)(void *func, int dummy, ...); #define declare_new(ret, ...) ret (*checked_call)(void *, int dummy, __VA_ARGS__) = (void *)checkasm_checked_call; #define call_new(...) checked_call(func_new, 0, __VA_ARGS__) #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 call_new(...) checked_call(func_new, __VA_ARGS__) +#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__)) #else #define declare_new(ret, ...) #define declare_new_emms(cpu_flags, ret, ...) |