[FFmpeg-devel] [PATCH] Fix compilation with llvm-gcc on x86_64

Måns Rullgård mans
Sun Nov 1 20:22:32 CET 2009


Loren Merritt <lorenm at u.washington.edu> writes:

> On Sun, 1 Nov 2009, 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.
>>
>> Apparently, LLVM also dislikes +g constraints with int operands on
>> x86_64, probably due to register being wider than int.  Using a +r
>> constraint instead works with gcc 3.4.6, gcc 4.3.4, and llvm-gcc 2.6.
>
> But register isn't wider than int. "+g" associated with a 32bit
> variable means "either a 32bit register or a 32bit memory", and
> likewise for other sizes.

You're obviously right.  So this is a compiler bug?

All else aside, since +r seems to work, is there any reason not to use
that instead?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list