Check these constraints even for non-pic-elf configurations, to
catch the issues without having to build/test a pic-elf configuration
to find out.
---
This would have caught the issue in the vp9mc, without actually
having to test a pic configuration.
---
 libavutil/arm/asm.S | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index 4ac0ea2..55aa5ff 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -184,6 +184,14 @@ T       ldr             \rd, [\rd]
 .endm
 
 .macro  movrelx         rd,  val, gp
+    .ifc \rd,r12
+      .ifb \gp
+        .error          "movrelx rd=r12, needs a manually set gp"
+      .endif
+    .endif
+    .ifc \gp,\rd
+        .error          "movrelx rd=gp doesn't work"
+    .endif
 #if CONFIG_PIC && defined(__ELF__)
     .ifnb \gp
       .if .Lpic_gp
-- 
2.7.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to