[Ffmpeg-devel] Compiler error in latest CVS

Robert Edele yartrebo
Fri Mar 24 20:00:18 CET 2006


On Fri, 2006-03-24 at 13:27 -0500, Rich Felker wrote:
> On Fri, Mar 24, 2006 at 12:10:00PM -0500, Isaac Richards wrote:
> > On Friday 24 March 2006 11:11, Guillaume POIRIER wrote:
> > > Hi,
> > >
> > > On 3/24/06, Kevin Kuphal <kuphal at dls.net> wrote:
> > > > After the latest snow optimizations, I get this compiler error:
> > > >
> > > > i386/snowdsp_mmx.c: In function ?ff_snow_vertical_compose97i_sse2?:
> > > > i386/snowdsp_mmx.c:490: error: PIC register ?%ebx? clobbered in ?asm?
> > > > i386/snowdsp_mmx.c: In function ?ff_snow_vertical_compose97i_mmx?:
> > > > i386/snowdsp_mmx.c:597: error: PIC register ?%ebx? clobbered in ?asm?
> > > > make[2]: *** [snowdsp_mmx.o] Error 1
> > > > make[2]: Leaving directory `/root/mythtv-svn/mythtv/libs/libavcodec'
> > > > make[1]: *** [sub-libavcodec] Error 2
> > > > make[1]: Leaving directory `/root/mythtv-svn/mythtv/libs'
> > > > make: *** [sub-libs] Error 2
> > > >
> > > > gcc 4.0.1 on FC4.  It doesn't error on my gcc 3.2.2 system on RH9
> > >
> > > Looks like libavcodec can't be compiled as dynamic library with these
> > > optimizations. Do you have a way to have MythTV user static version of
> > > lavc?
> > 
> > It's not the optimizations.  As the error message says, the code's clobbering 
> > ebx - everything else in libavcodec plays nice and doesn't.
> 
> Clobbering ebx is completely valid, but gcc does not allow it when
> compiling with -fPIC. Disable PIC and it will work fine. Better yet,
> send a bug report to the gcc developers telling them they should just
> reload ebx with the GOT address after asm if it happened to get
> clobbered.
> 
> Rich

That looks like my code. If PIC support is very important to anyone
(whatever that is), they're free to write a patch that avoids the use of
ebx. Avoiding it is easy in vertical_compose, but it will likely be very
hard to avoid using in inner_add_yblock because every register gets
used, and I already had to make sacrifices to squeeze it in the existing
registers. A loss of speed in add_yblock is also inevitable if ebx is
not used (perhaps as little as a push and pop of ebx if you can use that
with GCC inline assmebly).

Robert Edele





More information about the ffmpeg-devel mailing list