Browse Source

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.
tags/n3.4
Janne Grunau 9 years ago
parent
commit
6a1ea4ec93
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      libavutil/arm/asm.S

+ 9
- 0
libavutil/arm/asm.S View File

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


Loading…
Cancel
Save