[FFmpeg-devel] [PATCH] Fix compilation of FASTDIV() with llvm-gcc on x86_64

Reimar Döffinger Reimar.Doeffinger
Mon Jul 5 20:08:40 CEST 2010


On Mon, Jul 05, 2010 at 06:57:32PM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> 
> > On Mon, Jul 05, 2010 at 06:45:38PM +0100, M?ns Rullg?rd wrote:
> >> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> >> 
> >> > On Mon, Jul 05, 2010 at 02:54:09PM +0100, Mans Rullgard wrote:
> >> >> LLVM requires matching input and output asm parameters to have the
> >> >> same type.  For the FASTDIV macro, an (int) cast on the input fixes
> >> >> this trivially.
> >> >
> >> > Uh, where is a different type than int used with FASTDIV?
> >> > I am not at all convinced those uses are really correct.
> >> 
> >> vorbis_dec.c line 1329.
> >
> > partition_size being uint32t_fast seems completely pointless to me,
> > it is not used for array indexing,
> 
> What has array indexing go to do with anything?

x86_64 indexing load/stores are one of the few instructions that cannot
use 32 bit registers, thus 32 bit variables used for indexing must
be sign- (and in corner-cases I think possibly 0-) extended in such a case.



More information about the ffmpeg-devel mailing list