[FFmpeg-devel] [PATCH] nasm support

Reimar Döffinger Reimar.Doeffinger
Sat Sep 4 17:51:13 CEST 2010

On Sat, Sep 04, 2010 at 03:36:49PM +0000, Loren Merritt wrote:
> On Fri, 3 Sep 2010, Reimar D?ffinger wrote:
> >this allows compiling FFmpeg asm code with nasm.
> >Advantages:
> >1) nasm support OS/2 OMF format
> >2) there's a Cygwin package for nasm
> >Tested on 64 bit Linux, compiles and passes tests.
> >Obviously it would be a good idea for someone to test it
> >on 32 bit...
> I'm mildly opposed to accommodating nasm. I promise not to ever test
> my code on nasm; someone else can notice and fix it if I happen to
> use some yasm syntax that nasm doesn't like again.
> But if y'all think OS/2 is important, I won't grumble too much.

"Important" is an exaggeration, but on the other hand we make an
effort to support all kinds of compilers which hardly brings any
more advantages.
And at least the movd changes are IMO good for consistency, at least
The addressing one is more questionable, on the other hand I think the
x/6 (x/6)^1 stuff is also quite obfuscate so _I_ wouldn't consider it
a reason not to make it easier for OS/2.
I admit I also don't mind being able to just installing nasm on cygwin
instead of having to compile yasm myself.

> Btw, __OUTPUT_FORMAT__ is equal to the literal string passed to
> "-f", which thus treats "-f elf64" and "-f elf -m amd64"
> differently. This is relevant to a few lines in x86inc.asm.

The other question is if those lines are really relevant.
Correct me if I'm wrong, but the "function hidden" is handled
by our linker script, and for the execstack AFAIK
1) the default is now noexec
2) when the default was exec, I have never seen it work reliably
   on any large program (at least not when using inline asm),
   so if we care we should be using -Wl,-z,noexecstack anyway.

More information about the ffmpeg-devel mailing list