[Ffmpeg-devel] Still struggling with -fPIC and MMX asm-code
Michael Niedermayer
michaelni
Sat Jul 16 01:52:46 CEST 2005
Hi
On Saturday 16 July 2005 00:45, Tobias Grimm wrote:
[...]
> >with movl on the stack without changing %%esp
>
> Do you mean this way?
well, not exactly, the stack grows downward not upward, so a pushl x is
equivalent to
esp -= 4;
*esp= x
>
>
> #if defined(PIC) && !defined(ARCH_X86_64)
> "movl %%"REG_b", 4(%%esp) \n\t" // "push" REG_b
> without modifying %esp
> "movl %2, %%"REG_b" \n\t"
> "movq (%%"REG_b", %%"REG_a"), %%mm5 \n\t" // qmat[i]
> "movl 4(%%esp), %%"REG_b" \n\t" // "pop" REG_b
> without modifying %esp
btw, another possible solution for this case would be to
addl %2, %%"REG_a"
movq (%%"REG_a"), %%mm5
subl %2, %%"REG_a"
[...]
--
Michael
More information about the ffmpeg-devel
mailing list