[FFmpeg-devel] Nasm/yasm support and x264 asm

Loren Merritt lorenm
Tue Jul 29 16:53:12 CEST 2008

On Tue, 29 Jul 2008, Michael Niedermayer wrote:
> One thing for example that i would not accept in unshared code is
> the numbered registers, the registers have names and hiding them behind
> numbers is idiotic. using new names for the native 32/64 bit size makes
> sense but they should be based on the historic names of the registers.
> nax, nbx, ... would be a random option
> If one would rename the registers per function so the code would be
> more readable and use thing like src, dst, stride, ... that would be
> nice but changing eax/ebx/... to r0/r1/... really is not, unless for the
> occasional case where a r0 really maps to different physical registers
> at different points in a function but in that case it almost certainly
> should have some more descriptive name ...

Interesting. I see no point in inventing a new name like "nax". When I 
want to refer to the native size of register "a", I just use "rax" which 
is defined to "eax" on x86_32 and not defined on x86_64.
The point of the numbered registers is that they don't have a fixed 
correspondence to the lettered registers, they correspond to function 
arguments. I didn't immediately see a way to allocate named function 
arguments; maybe I should spend some more time looking. (To be precise, I 
do see how to add a parameter list to a function declaration, but not how 
to cleanup the definitions at the end of the function. Afaict yasm lacks 
sufficient control over dereferencing (this is shared by several other 
languages, like C preprocessor and shell).)

--Loren Merritt

More information about the ffmpeg-devel mailing list