[FFmpeg-devel] [PATCH] HACK: fix compilation with NASM.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Nov 20 15:04:49 CET 2011
On Sun, Nov 20, 2011 at 01:35:05PM +0100, jb wrote:
> On Sunday 20 November 2011 12:45:19 Reimar Döffinger wrote:
> > On Sat, Nov 19, 2011 at 01:17:22PM +0900, KO Myung-Hun wrote:
>
> > > > 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 842a2cc..4e1eef5 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
> > > > + %ifempty SUFFIX
> > > > + cglobal_internal %1
> > > > + %else
> > > >
> > > > cglobal_internal %1 %+ SUFFIX
> > > >
> > > > + %endif
> > > >
> > > > %else
> > > >
> > > > + ; HACK: work around %+ broken with empty SUFFIX for nasm
> > > > 2.09.10
> > > > + %ifempty SUFFIX
> > > > + 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
> > > > + %ifempty SUFFIX
> > > > + call_internal %1, %1
> > > > + %else
> > > >
> > > > call_internal %1, %1 %+ SUFFIX
> > > >
> > > > + %endif
> > > >
> > > > %endmacro
> > > > %macro call_internal 2
> > > >
> > > > %xdefine %%i %1
> > >
> > > ok with me.
>
> Breaks compilation for me with yasm:
>
> yasm: FATAL: (cglobal:8) `%else': no matching `%if'
> make: *** [libavcodec/x86/ac3dsp.o] Error 1
>
> Using yasm 1.1.0.2352
> Compiled on Jun 10 2011.
> Copyright (c) 2001-2010 Peter Johnson and other Yasm developers.
> Run yasm --license for licensing overview and summary.
Reverted to my original version of the patch.
No idea why YASM doesn't implement %ifempty, it seems to
exist in nasm since 2008.
More information about the ffmpeg-devel
mailing list