From 824e8c284054f323f854892d1b4739239ed1fdc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 10 Nov 2016 13:23:38 +0200 Subject: [PATCH] arm: Clear the gp register alias at the end of functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We reset .Lpic_gp to zero at the start of each function, which means that the logic within movrelx for clearing gp when necessary will be missed. This fixes using movrelx in different functions with a different helper register. Signed-off-by: Martin Storsjö --- libavutil/arm/asm.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index 1a048b56fb..4ac0ea2e4f 100644 --- a/libavutil/arm/asm.S +++ b/libavutil/arm/asm.S @@ -83,6 +83,9 @@ ELF .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable put_pic %(.Lpic_idx - 1) .noaltmacro .endif + .if .Lpic_gp + .unreq gp + .endif ELF .size \name, . - \name FUNC .endfunc .purgem endfunc