>>>>> "WL" == Werner LEMBERG <w...@gnu.org> 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 <cl...@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to