aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/checkasm.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-23 17:36:53 -0300
committerJames Almer <jamrial@gmail.com>2017-03-23 17:36:53 -0300
commita2d34cc51ba1e3c19928f1c5aedd7a2990593c47 (patch)
tree41405f986c9ce565f6ab48a226e3bdb417ea7ffd /tests/checkasm/checkasm.h
parentcab4c7fa199fe98db2b298d64eb6cfa386dae939 (diff)
parentf1b3e131385176c3c9d9783b25047856a0dcebf6 (diff)
downloadffmpeg-a2d34cc51ba1e3c19928f1c5aedd7a2990593c47.tar.gz
Merge commit 'f1b3e131385176c3c9d9783b25047856a0dcebf6'
* commit 'f1b3e131385176c3c9d9783b25047856a0dcebf6': checkasm: aarch64: Clobber the stack before calling functions Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tests/checkasm/checkasm.h')
-rw-r--r--tests/checkasm/checkasm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 18f65e33cf..b3fa83a93e 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -139,9 +139,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, ...)