[x265] [PATCH] aarch64: replace ldr pseudo-instruction with adrp+add

Fangrui Song maskray at google.com
Mon Aug 29 18:33:37 UTC 2022


The ldr pseudo-instruction uses a literal pool, which is less efficient
and does not decrease the code size.
---
 source/common/aarch64/asm.S | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/source/common/aarch64/asm.S b/source/common/aarch64/asm.S
index 399c37cf2..2506f50aa 100644
--- a/source/common/aarch64/asm.S
+++ b/source/common/aarch64/asm.S
@@ -130,11 +130,9 @@ ELF     .size   \name, . - \name
         adrp            \rd, \val+(\offset)
         add             \rd, \rd, :lo12:\val+(\offset)
   .endif
-#elif defined(PIC)
+#else
         adrp            \rd, \val+(\offset)
         add             \rd, \rd, :lo12:\val+(\offset)
-#else
-        ldr             \rd, =\val+\offset
 #endif
 .endm
 
-- 
2.37.2.672.g94769d06f0-goog



More information about the x265-devel mailing list