Hi,

On Sun, Jan 17, 2016 at 6:21 PM, Henrik Gramner <hen...@gramner.com> wrote:

> When allocating stack space with a larger alignment than the known stack
> alignment a temporary register is used for storing the stack pointer.
> Ensure that this isn't one of the registers used for passing arguments.
> ---
>  libavutil/x86/x86inc.asm | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
> index fc58b74..c355ee7 100644
> --- a/libavutil/x86/x86inc.asm
> +++ b/libavutil/x86/x86inc.asm
> @@ -386,8 +386,10 @@ DECLARE_REG_TMP_SIZE
> 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
>          %if %1 != 0 && required_stack_alignment > STACK_ALIGNMENT
>              %if %1 > 0
>                  %assign regs_used (regs_used + 1)
> -            %elif ARCH_X86_64 && regs_used == num_args && num_args <= 4 +
> UNIX64 * 2
> -                %warning "Stack pointer will overwrite register argument"
> +            %endif
> +            %if ARCH_X86_64 && regs_used < 5 + UNIX64 * 3
> +                ; Ensure that we don't clobber any registers containing
> arguments
> +                %assign regs_used 5 + UNIX64 * 3


Why 5 + unix * 3 and not 5 +unix * 2? Isn't unix64 6 regs and win64 4 regs?

Ronald
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to