On Sun, 20 Nov 2016, Janne Grunau wrote:
Hi,I think the warning is good enough despite the possible false positives. I doubt there is good reason to use another register as constant gp and r12 as destination. JAnne ---8<--- 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. --- libavutil/arm/asm.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index 4ac0ea2e4f..a791e80c57 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 -- 2.11.0.rc2
LGTM // Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
