diff options
author | Martin Storsjö | 2016-11-14 12:32:20 +0200 |
---|---|---|
committer | Ronald S. Bultje | 2016-11-15 15:10:03 -0500 |
commit | 86c5a23ee5236aa0996435247a2141ac90fc491e (patch) | |
tree | c36620e5002f70a55c8611e190d5abfa1510c475 /libavutil/arm | |
parent | 6409e9b6ccde39895a93f48212078e6c0872f8e7 (diff) |
arm: Clear the gp register alias at the end of functions
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.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavutil/arm')
-rw-r--r-- | libavutil/arm/asm.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index e9b0bcabdb..b0a6e50a3d 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 |