freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [PATCH] Improve FT_MulFix


From: Werner LEMBERG
Subject: Re: [ft-devel] [PATCH] Improve FT_MulFix
Date: Fri, 08 Apr 2011 08:16:38 +0200 (CEST)

> WL> If James confirms your statement, I'm going to replace the code as
> WL> he has suggested in his patch..
> 
> It is identical in effect, and the idea comes from the assembly
> versions FT_MulFix_arm and FT_MulFix_i386 which are already there
> (builds/unix/ ftconfig.in and again in
> include/freetype/config/ftconfig.h).

So you say this code always works with any compiler, right?

> The FT_LONG64 blocks of ftcalc.c are ignored for all (modern) gcc
> builds becasue of this code in (both versions of) ftconfig:
> 
> #ifdef __STDC__
> 
>   /* undefine the 64-bit macros in strict ANSI compilation mode */
> #undef FT_LONG64
> #undef FT_INT64
> 
> #endif /* __STDC__ */
> 
> That might have been reasonable in the past, but __STDC__ is defined
> by default now (even w/o the -ansi -pedantic which freetype forces
> on), int64_t and uint64_t are part of std c, and FT_LONG64 should be
> unconditionally set when on a LP64 arch.
> 
> And gcc's output even on ILP32 arches is generally better than
> freetype's !FT_LONG64 code, since most such archs have a 32x32=64
> bit integer multiply instruction and gcc is smart enough to notice
> that the multiplicands are 32 bits.

We are reaching an area where I'm blissfully ignorant...  What patches
do you suggest to fix this issue so that it works with any compiler?


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]