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

Martin Storsjö martin at martin.st
Mon Nov 14 12:32:20 EET 2016


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(+)

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
-- 
2.7.4



More information about the ffmpeg-devel mailing list