summaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2016-11-18 21:06:40 +0100
committerJanne Grunau <janne-libav@jannau.net>2016-11-24 21:26:22 +0100
commit6a1ea4ec932f4fc9fdc00ec51ee070b298ddb35f (patch)
treebe6da974e66ab6ddd7081dde7fba65adfcb66c84 /libavutil
parent5bcc6f76f180d0f88269018727c92fc562fb8abb (diff)
downloadffmpeg-streaming-6a1ea4ec932f4fc9fdc00ec51ee070b298ddb35f.zip
ffmpeg-streaming-6a1ea4ec932f4fc9fdc00ec51ee070b298ddb35f.tar.gz
arm: warn/error on movrelx usage problematic with PIC on ELF
The warning has false positives but our asm does not trigger it. For new code false positives can only be avoided by changing the register allocation.
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/arm/asm.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index 4ac0ea2..a791e80 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -184,6 +184,15 @@ T ldr \rd, [\rd]
.endm
.macro movrelx rd, val, gp
+ .ifc \rd,\gp
+ .error "movrelx needs two distinct registers"
+ .endif
+ .ifc \rd\()_\gp,r12_
+ .warning "movrelx rd=\rd without explicit set gp"
+ .endif
+ .ifc \rd\()_\gp,ip_
+ .warning "movrelx rd=\rd without explicit set gp"
+ .endif
#if CONFIG_PIC && defined(__ELF__)
.ifnb \gp
.if .Lpic_gp
OpenPOWER on IntegriCloud