[x265] [PATCH] AArch64: Fix scanPosLast_neon compilation with old binutils

George Steed george.steed at arm.com
Tue Jul 29 10:38:16 UTC 2025


When compiling using GNU Binutils version 2.38 (the default on Ubuntu
22.04), the assembler does not recognise the AArch64 BFC instruction
unless Armv8.2-A is enabled. This causes the scanPosLast_neon function
to fail to compile. This appears to be fixed with GNU Binutils 2.42 (the
default on Ubuntu 24.04).

The BFC instruction is an alias of BFM, so rewrite it to express with a
BFM instruction instead. This ensures that it compiles even on the older
GNU Binutils version.
---
 source/common/aarch64/pixel-util.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/common/aarch64/pixel-util.S b/source/common/aarch64/pixel-util.S
index e2b31e4a1..81cf17c0d 100644
--- a/source/common/aarch64/pixel-util.S
+++ b/source/common/aarch64/pixel-util.S
@@ -860,7 +860,7 @@ function PFX(scanPosLast_neon)
     lsl             w13, w13, w6
     lsl             w15, w15, w6
     extr            w14, w14, w13, #31
-    bfc             w15, #31, #1
+    bfm             w15, wzr, #1, #0
     cbnz            w15, .Loop_spl_1
 .Lpext_end:
     strh            w14, [x2], #2
-- 
2.43.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AArch64-Fix-scanPosLast_neon-compilation-with-old-bi.patch
Type: text/x-diff
Size: 1332 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250729/a80bb775/attachment.patch>


More information about the x265-devel mailing list