diff options
author | Martin Storsjö <martin@martin.st> | 2016-09-30 11:49:47 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-10-16 23:26:15 +0300 |
commit | a05cc56124b4f1237f6355784de821e3290ddb44 (patch) | |
tree | 57dc81b83b3e45767ddabcc9751e2ee280b81e0d /tests/checkasm/arm | |
parent | 8e2ea691351c5079cdab245ff7bfa5c0f3e3bfe4 (diff) | |
download | ffmpeg-a05cc56124b4f1237f6355784de821e3290ddb44.tar.gz |
checkasm: arm/aarch64: Fix the amount of space reserved for stack parameters
Even if MAX_ARGS - 2 (for arm) or MAX_ARGS - 7 (for aarch64) parameters
are passed on the stack to checkasm_checked_call, we actually only
need to store MAX_ARGS - 4 (for arm) or MAX_ARGS - 8 (for aarch64)
parameters on the stack when calling the tested function.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests/checkasm/arm')
-rw-r--r-- | tests/checkasm/arm/checkasm.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/checkasm/arm/checkasm.S b/tests/checkasm/arm/checkasm.S index 098f22eaef..237252f978 100644 --- a/tests/checkasm/arm/checkasm.S +++ b/tests/checkasm/arm/checkasm.S @@ -50,7 +50,7 @@ endconst @ max number of args used by any asm function. #define MAX_ARGS 15 -#define ARG_STACK 4*(MAX_ARGS - 2) +#define ARG_STACK 4*(MAX_ARGS - 4) @ align the used stack space to 8 to preserve the stack alignment #define ARG_STACK_A (((ARG_STACK + pushed + 7) & ~7) - pushed) @@ -74,7 +74,7 @@ function checkasm_checked_call_\variant, export=1 sub sp, sp, #ARG_STACK_A .equ pos, 0 -.rept MAX_ARGS-2 +.rept MAX_ARGS-4 ldr r12, [sp, #ARG_STACK_A + pushed + 8 + pos] str r12, [sp, #pos] .equ pos, pos + 4 |