[x265] [PATCH 09 of 20] x86inc: Avoid creating unnecessary local labels

vignesh at multicorewareinc.com vignesh at multicorewareinc.com
Mon Jun 12 07:37:51 CEST 2017


# HG changeset patch
# User Vignesh Vijayakumar
# Date 1497243429 -19800
#      Mon Jun 12 10:27:09 2017 +0530
# Node ID 186284517c0f6ad40285fcd93aac95540f5467a1
# Parent  bad80336881e1aff558c055ccdcd10f23cbb819f
x86inc: Avoid creating unnecessary local labels

The REP_RET workaround is only needed on old AMD cpus, and the labels clutter
up the symbol table and confuse debugging/profiling tools, so use EQU to
create SHN_ABS symbols instead of creating local labels. Furthermore, skip
the workaround completely in functions that definitely won't run on such cpus.

This patch doesn't modify any emitted instructions, and doesn't actually affect
x265 at all. It's only for other projects that use x86inc.asm without an
appropriate `strip` command in their buildsystem.

diff -r bad80336881e -r 186284517c0f source/common/x86/x86inc.asm
--- a/source/common/x86/x86inc.asm	Tue Jun 06 15:27:51 2017 +0530
+++ b/source/common/x86/x86inc.asm	Mon Jun 12 10:27:09 2017 +0530
@@ -628,8 +628,10 @@
     %rep %0
         %macro %1 1-2 %1
             %2 %1
-            %%branch_instr:
-            %xdefine last_branch_adr %%branch_instr
+            %if notcpuflag(ssse3)
+                %%branch_instr equ $
+                %xdefine last_branch_adr %%branch_instr
+            %endif
         %endmacro
         %rotate 1
     %endrep


More information about the x265-devel mailing list