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: James Cloos
Subject: Re: [ft-devel] [PATCH] Improve FT_MulFix
Date: Thu, 07 Apr 2011 18:32:12 -0400
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

>>>>> "WL" == Werner LEMBERG <address@hidden> writes:

WL> Oh, so it's really me who is dumb :-)

:-)

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).

But I ran into a problem.

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 uncond-
itionally 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.

-JimC
-- 
James Cloos <address@hidden>         OpenPGP: 1024D/ED7DAEA6



reply via email to

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