[FFmpeg-cvslog] x86: fix build with nasm 2.08
Mans Rullgard
git at videolan.org
Tue Aug 7 23:09:27 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Aug 6 02:26:15 2012 +0100| [edd82267958fbbd34eca4f4dbfb96197b9b40ab5] | committer: Mans Rullgard
x86: fix build with nasm 2.08
It appears that something goes wrong in old nasm versions when the
%+ operator is used in the last argument of a macro invocation and
this argument is tested with %ifdef within the macro. This patch
rearranges the macro arguments such that the %+ operator is never
used in the last argument.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edd82267958fbbd34eca4f4dbfb96197b9b40ab5
---
libavutil/x86/x86inc.asm | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index e729924..5cb200f 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -505,12 +505,8 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
; Applies any symbol mangling needed for C linkage, and sets up a define such that
; subsequent uses of the function name automatically refer to the mangled version.
; Appends cpuflags to the function name if cpuflags has been specified.
-%macro cglobal 1-2+ ; name, [PROLOGUE args]
-%if %0 == 1
- cglobal_internal %1 %+ SUFFIX
-%else
+%macro cglobal 1-2+ "" ; name, [PROLOGUE args]
cglobal_internal %1 %+ SUFFIX, %2
-%endif
%endmacro
%macro cglobal_internal 1-2+
%ifndef cglobaled_%1
@@ -528,7 +524,7 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
%1:
RESET_MM_PERMUTATION ; not really needed, but makes disassembly somewhat nicer
%assign stack_offset 0
- %if %0 > 1
+ %ifnidn %2, ""
PROLOGUE %2
%endif
%endmacro
@@ -795,13 +791,13 @@ INIT_XMM
; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't
%macro call 1
- call_internal %1, %1 %+ SUFFIX
+ call_internal %1 %+ SUFFIX, %1
%endmacro
%macro call_internal 2
- %xdefine %%i %1
- %ifndef cglobaled_%1
- %ifdef cglobaled_%2
- %xdefine %%i %2
+ %xdefine %%i %2
+ %ifndef cglobaled_%2
+ %ifdef cglobaled_%1
+ %xdefine %%i %1
%endif
%endif
call %%i
More information about the ffmpeg-cvslog
mailing list