[x265] [PATCH] asm: align stack to 64-bytes, to avoid crash

chen chenm003 at 163.com
Wed Apr 16 17:50:35 CEST 2014


At 2014-04-16 22:02:54,dnyaneshwar at multicorewareinc.com wrote:
># HG changeset patch
># User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
># Date 1397656046 -19800
>#      Wed Apr 16 19:17:26 2014 +0530
># Node ID 02ab691ea6ecceb5495d0ffa3f71d7752aecc046
># Parent  0b696c7f46f261f66ecebbe3280b17c01165f3d0
>asm: align stack to 64-bytes, to avoid crash
>
>diff -r 0b696c7f46f2 -r 02ab691ea6ec source/common/x86/intrapred8.asm
>--- a/source/common/x86/intrapred8.asm Tue Apr 15 14:07:33 2014 -0500
>+++ b/source/common/x86/intrapred8.asm Wed Apr 16 19:17:26 2014 +0530
>@@ -619,7 +619,13 @@
>   %define bottomRow2    m10
>   %define bottomRow3    m11
> %else
>-cglobal intra_pred_planar32, 4,7,8,0-(4*mmsize)
>+cglobal intra_pred_planar32, 4,7,8
>+  ; align stack to 64-bytes
>+  mov r6, rsp
>+  sub rsp, 64+gprsize
64 -> 4*mmsize
 
>+  and rsp, ~63
>+  mov [rsp+64], r6
same as above

>+
>   %define bottomRow0    [rsp + 0 * mmsize]
>   %define bottomRow1    [rsp + 1 * mmsize]
>   %define bottomRow2    [rsp + 2 * mmsize]
>@@ -713,7 +719,9 @@
>     dec             r3
>     jnz .loop
> %undef COMP_PRED_PLANAR_ROW
>-
>+%if ARCH_X86_64 == 0
>+    mov rsp, [rsp+64]
>+%endif
condition compile will broken x64 build

>     RET
> 
> ;-----------------------------------------------------------------------------
>_______________________________________________
>x265-devel mailing list
>x265-devel at videolan.org
>https://mailman.videolan.org/listinfo/x265-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140416/7ca3d806/attachment.html>


More information about the x265-devel mailing list