[x264-devel] [PATCH 3/6] arm: Add a macro for calling external functions

Martin Storsjö martin at martin.st
Mon Oct 16 21:46:31 CEST 2017


This can be squashed into "arm: Set the function symbol prefix in a
single location".

This doesn't fix any bug, but makes the code cleaner; taking the same
approach on arm as in the previous patch for aarch64.
---
 common/arm/asm.S     | 3 +++
 tools/checkasm-arm.S | 6 +-----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/common/arm/asm.S b/common/arm/asm.S
index b436814..619a509 100644
--- a/common/arm/asm.S
+++ b/common/arm/asm.S
@@ -38,8 +38,10 @@
 
 #ifdef PREFIX
 #   define BASE _x264_
+#   define SYM_PREFIX _
 #else
 #   define BASE x264_
+#   define SYM_PREFIX
 #endif
 
 #ifdef BIT_DEPTH
@@ -50,6 +52,7 @@
 
 #define X(s) JOIN(EXTERN_ASM, s)
 #define X264(s) JOIN(BASE, s)
+#define EXT(s) JOIN(SYM_PREFIX, s)
 
 #ifdef __ELF__
 #   define ELF
diff --git a/tools/checkasm-arm.S b/tools/checkasm-arm.S
index c7be467..ec1a668 100644
--- a/tools/checkasm-arm.S
+++ b/tools/checkasm-arm.S
@@ -128,11 +128,7 @@ function checkasm_call_\variant
     mov         r12, #0
     str         r12, [r2]
     movrel      r0, error_message
-#ifdef PREFIX
-    blx         _puts
-#else
-    blx         puts
-#endif
+    blx         EXT(puts)
 0:
     pop         {r0, r1}
 .ifc \variant, neon
-- 
2.7.4



More information about the x264-devel mailing list