[FFmpeg-devel] [PATCH] Fix compilation of FASTDIV() with llvm-gcc on x86_64
Måns Rullgård
mans
Mon Jul 5 18:47:24 CEST 2010
Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> On Mon, Jul 05, 2010 at 04:01:26PM +0100, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> 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.
>> >
>> > the extra cast likely slows it down
>>
>> GCC generates the same code.
>
> That seems strange, wouldn't the compiler have to do an explicit
> sign extension when you add that cast?
> Well, unless it does a mov anyway before, then it just needs to replace
> it by a movslq.
> But that would still be a change, so does gcc do the cast implicitly or what?
Sorry, I spoke too soon. There was one %eax replaced by %rax.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list