[FFmpeg-devel] Nasm/yasm support and x264 asm
Loren Merritt
lorenm
Tue Jul 29 15:46:54 CEST 2008
On Tue, 29 Jul 2008, Luca Barbato wrote:
> Jason Garrett-Glaser wrote:
>> Without these, it would likely be a nightmare to try to port the asm;
>> at the very least it would require a complete and total split of the
>> code into 32-bit and 64-bit versions, and sometimes MMX and SSE
>> versions, which would be a great way to create yet another "big ball
>> of mud" in dsputil.
>
> given x86 and x86_64 are different arches with different misfeatures and
> MMX and SSE should be again different arch extensions with different
> misfeatures, I always find strange having the code shared.
x86_32 and x86_64 are different archs, but the vast majority of the time I
use neither the obsoleted parts of x86_32 (what did you expect, segmented
memory? binary coded decimal?) nor the additions to x86_64 (most dsp
functions can be written with <=7 gprs, and don't benefit from more. nor
do they use 64bit scalar math).
So the only remaining differences are calling convention and register
names, which can be abstracted away with nasm macros just like they're
abstracted away by gcc in the case of inline asm.
What's strange about merging two sets of simd that have all the same
instructions and differ only in vector size?
OK, I can see exactly one more difference: unaligned memory args to
non-mov instructions.
--Loren Merritt
More information about the ffmpeg-devel
mailing list