diff mbox

[FFmpeg-devel,2/9] arm: Clear the gp register alias at the end of functions

Message ID 1479119547-7392-2-git-send-email-martin@martin.st
State Accepted
Commit 824e8c284054f323f854892d1b4739239ed1fdc7
Headers show

Commit Message

Martin Storsjö Nov. 14, 2016, 10:32 a.m. UTC
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.

This is cherry-picked from libav commit
824e8c284054f323f854892d1b4739239ed1fdc7.
---
 libavutil/arm/asm.S | 3 +++
 1 file changed, 3 insertions(+)

Comments

Ronald S. Bultje Nov. 14, 2016, 1:01 p.m. UTC | #1
Hi,

assume this is my reply on all patches in the range 2-9:

On Mon, Nov 14, 2016 at 5:32 AM, Martin Storsjö <martin@martin.st> wrote:

> 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.
>
> This is cherry-picked from libav commit
> 824e8c284054f323f854892d1b4739239ed1fdc7.
> ---
>  libavutil/arm/asm.S | 3 +++
>  1 file changed, 3 insertions(+)


I have no idea about any of this stuff, so I can't give a proper technical
review.

I've followed review by actually knowledgeable people on these patches on
libav-devel and I think they have been sufficiently reviewed, so I'll push
this whole set tomorrow unless people object.

Ronald
diff mbox

Patch

diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index e9b0bca..b0a6e50 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -77,6 +77,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