[x264-devel] x86inc.asm: error on duplicate functions

Loren Merritt git at videolan.org
Mon Feb 7 06:31:30 CET 2011


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Sun Jan 30 02:27:32 2011 -0800| [08141fe1100d2cf87c5b6f474c02ddfcab4a22ac] | committer: Jason Garrett-Glaser

x86inc.asm: error on duplicate functions
Compile error if there's two functions of the same name, instead of silently renaming one of them.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=08141fe1100d2cf87c5b6f474c02ddfcab4a22ac
---

 common/x86/dct-a.asm     |    3 ++-
 common/x86/predict-a.asm |    5 ++++-
 common/x86/x86inc.asm    |    7 +++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/common/x86/dct-a.asm b/common/x86/dct-a.asm
index c81419c..ab33a59 100644
--- a/common/x86/dct-a.asm
+++ b/common/x86/dct-a.asm
@@ -1349,6 +1349,7 @@ ZIGZAG_8x8_CAVLC mmx , W
 %endif
 %endmacro
 
+%ifndef HIGH_BIT_DEPTH
 INIT_XMM
 cglobal zigzag_interleave_8x8_cavlc_sse2, 3,3,8
     INTERLEAVE_XMM  0
@@ -1364,4 +1365,4 @@ cglobal zigzag_interleave_8x8_cavlc_sse2, 3,3,8
     shr     r0d, 16
     mov  [r2+8], r0w
     RET
-
+%endif ; !HIGH_BIT_DEPTH
diff --git a/common/x86/predict-a.asm b/common/x86/predict-a.asm
index f64ea19..aefc638 100644
--- a/common/x86/predict-a.asm
+++ b/common/x86/predict-a.asm
@@ -1205,6 +1205,7 @@ ALIGN 4
 %endif ;!HIGH_BIT_DEPTH
     REP_RET
 
+%ifndef HIGH_BIT_DEPTH
 INIT_XMM
 ;-----------------------------------------------------------------------------
 ; void predict_8x8_ddl( uint8_t *src, uint8_t *edge )
@@ -1248,8 +1249,8 @@ cglobal predict_8x8_ddr_sse2, 2,2
 %endrep
     movq        [r0-3*FDEC_STRIDE], xmm0
     movq        [r0-4*FDEC_STRIDE], xmm1
-
     RET
+%endif ; !HIGH_BIT_DEPTH
 
 ;-----------------------------------------------------------------------------
 ; void predict_8x8_vl( uint8_t *src, uint8_t *edge )
@@ -1477,8 +1478,10 @@ cglobal predict_8x8_hu_%1, 2,2
     RET
 %endmacro
 
+%ifndef HIGH_BIT_DEPTH
 PREDICT_8x8_HU sse2
 PREDICT_8x8_HU ssse3
+%endif
 
 ;-----------------------------------------------------------------------------
 ; void predict_8x8c_v( uint8_t *src )
diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index c112509..7ddc1c2 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -450,8 +450,11 @@ DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28]
 
 ; Symbol prefix for C linkage
 %macro cglobal 1-2+
-    %xdefine %1 mangle(program_name %+ _ %+ %1)
-    %xdefine %1.skip_prologue %1 %+ .skip_prologue
+    %ifndef cglobaled_%1
+        %xdefine %1 mangle(program_name %+ _ %+ %1)
+        %xdefine %1.skip_prologue %1 %+ .skip_prologue
+        CAT_XDEFINE cglobaled_, %1, 1
+    %endif
     %ifidn __OUTPUT_FORMAT__,elf
         global %1:function hidden
     %else



More information about the x264-devel mailing list