[libav-devel] [PATCH] HACK: fix compilation with NASM.

Dave Yeo dave.r.yeo at gmail.com
Sun Nov 13 05:54:11 CET 2011


>From b77189d75915cf3a665f150eaf0f05a617d18ef5 Mon Sep 17 00:00:00 2001
From: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date: Sat, 12 Nov 2011 20:43:52 -0800
Subject: [PATCH] This issue is actually already fixed in NASM, however it will be a
  bit before it arrives everywhere.
 This should work as a temporary work-around.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

Signed-off-by: Dave Yeo <dave.r.yeo at gmail.com>
---
 libavutil/x86/x86inc.asm |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index 31f74b9..951bdfa 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -468,9 +468,19 @@ DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28]
 ; Appends cpuflags to the function name if cpuflags has been specified.
 %macro cglobal 1-2+ ; name, [PROLOGUE args]
 %if %0 == 1
+    ; HACK: work around %+ broken with empty SUFFIX for nasm 2.09.10
+    %ifndef cpuname
+    cglobal_internal %1
+    %else
     cglobal_internal %1 %+ SUFFIX
+%endif
 %else
+    ; HACK: work around %+ broken with empty SUFFIX for nasm 2.09.10
+    %ifndef cpuname
+    cglobal_internal %1, %2
+    %else
     cglobal_internal %1 %+ SUFFIX, %2
+    %endif
 %endif
 %endmacro
 %macro cglobal_internal 1-2+
@@ -747,7 +757,12 @@ INIT_XMM
 
 ; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't
 %macro call 1
+    ; HACK: work around %+ broken with empty SUFFIX for nasm 2.09.10
+    %ifndef cpuname
+    call_internal %1, %1
+    %else
     call_internal %1, %1 %+ SUFFIX
+    %endif
 %endmacro
 %macro call_internal 2
     %xdefine %%i %1
-- 
1.7.2.3


More information about the libav-devel mailing list