[x264-devel] checkasm: Fix stack alignment bug
Henrik Gramner
git at videolan.org
Mon May 20 23:06:46 CEST 2013
x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Fri May 10 13:55:32 2013 +0200| [e943696e98ba9a75f5100c5692e39708ff2cc422] | committer: Jason Garrett-Glaser
checkasm: Fix stack alignment bug
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e943696e98ba9a75f5100c5692e39708ff2cc422
---
tools/checkasm-a.asm | 4 ++++
tools/checkasm.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/checkasm-a.asm b/tools/checkasm-a.asm
index 7b39d93..de33043 100644
--- a/tools/checkasm-a.asm
+++ b/tools/checkasm-a.asm
@@ -207,8 +207,12 @@ cglobal checkasm_call, 1,7
; int x264_stack_pagealign( int (*func)(), int align )
;-----------------------------------------------------------------------------
cglobal stack_pagealign, 2,2
+ movsxdifnidn r1, r1d
push rbp
mov rbp, rsp
+%if WIN64
+ sub rsp, 32 ; shadow space
+%endif
and rsp, ~0xfff
sub rsp, r1
call r0
diff --git a/tools/checkasm.c b/tools/checkasm.c
index f429b43..4aaa445 100644
--- a/tools/checkasm.c
+++ b/tools/checkasm.c
@@ -2686,7 +2686,7 @@ int main(int argc, char *argv[])
fprintf( stderr, "%d/%d\r", i+1, BENCH_ALIGNS );
}
else
- ret = check_all_flags();
+ ret = x264_stack_pagealign( check_all_flags, 0 );
if( ret )
{
More information about the x264-devel
mailing list