[MPlayer-cvslog] CVS: main/postproc swscale_template.c, 1.124, 1.125
Michael Niedermayer
michaelni at gmx.at
Sat May 6 13:03:43 CEST 2006
Hi
On Sat, May 06, 2006 at 11:13:56AM +0200, Reimar Döffinger wrote:
> Hi,
> On Sat, May 06, 2006 at 04:01:42AM +0200, Michael Niedermayer CVS wrote:
> > asm volatile(
> > - "mov %%"REG_SP", "ESP_OFFSET"(%5) \n\t"
> > - "mov %4, %%"REG_SP" \n\t"
> > - YSCALEYUV2RGB(%%REGa, %5)
> > - WRITEBGR32(%%REGSP, 8280(%5), %%REGa)
> > - "mov "ESP_OFFSET"(%5), %%"REG_SP" \n\t"
> > -
> > - :: "r" (buf0), "r" (buf1), "r" (uvbuf0), "r" (uvbuf1), "m" (dest),
> > - "r" (&c->redDither)
> > - : "%"REG_a
> > + "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
> > + "mov %4, %%"REG_b" \n\t"
> > + "push %%"REG_BP" \n\t"
> > + YSCALEYUV2RGB(%%REGBP, %5)
> > + WRITEBGR32(%%REGb, 8280(%5), %%REGBP)
> > + "pop %%"REG_BP" \n\t"
> > + "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
> > +
> > + :: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest),
> > + "a" (&c->redDither)
>
> Is there a reason why REG_b is save/restored into the struct and REG_BP
> on the stack? Can't both be stored in the same place? (I would prefer
> stack, but I don't know about performance implications).
push %%"REG_b"
mov %4, %%"REG_b"
%4 is "m" and gcc can address "m" over esp or ebp (without
fomit-frame-pointer it uses ebp, with its esp) if it uses esp, there will
be some "interference" with the push as it changes esp, but we cant always
add a constant either as it might choose not to use esp ...
correct would be obviously to add all that to the constraints and the
clobberlist, but as ebx as constraint doesnt work with PIC and ebp&esp never
work ... x86 with 8 registers is fine gcc-x86 with 5 registers is the problem
writing both to the struct is of coarse possible, but would have been a bigger
change, feel free to change it if you like ...
[...]
--
Michael
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the MPlayer-cvslog
mailing list