ftconfig.h   ftconfig.h 
/* ftconfig.h. Generated from ftconfig.in by configure. */ /* ftconfig.h. Generated from ftconfig.in by configure. */
/************************************************************************** */ /************************************************************************** */
/* */ /* */
/* ftconfig.in */ /* ftconfig.in */
/* */ /* */
/* UNIX-specific configuration file (specification only). */ /* UNIX-specific configuration file (specification only). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ /* Copyright 1996-2004, 2006-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/************************************************************************** */ /************************************************************************** */
skipping to change at line 142 skipping to change at line 142
/************************************************************************ */ /************************************************************************ */
/* */ /* */
/* Mac support */ /* Mac support */
/* */ /* */
/* This is the only necessary change, so it is defined here instead */ /* This is the only necessary change, so it is defined here instead */
/* providing a new configuration file. */ /* providing a new configuration file. */
/* */ /* */
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
( defined( __MWERKS__ ) && defined( macintosh ) ) ( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */ /* no Carbon frameworks for 64bit 10.4.x */
/* AvailabilityMacros.h is available since Mac OS X 10.2, */
/* so guess the system version by maximum errno before inclusion */
#include <errno.h>
#ifdef ECANCELED /* defined since 10.2 */
#include "AvailabilityMacros.h" #include "AvailabilityMacros.h"
#endif
#if defined( __LP64__ ) && \ #if defined( __LP64__ ) && \
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
#define DARWIN_NO_CARBON 1 #define DARWIN_NO_CARBON 1
#else #else
#define FT_MACINTOSH 1 #define FT_MACINTOSH 1
#endif #endif
#elif defined( __SC__ ) || defined( __MRC__ ) #elif defined( __SC__ ) || defined( __MRC__ )
/* Classic MacOS compilers */ /* Classic MacOS compilers */
#include "ConditionalMacros.h" #include "ConditionalMacros.h"
skipping to change at line 272 skipping to change at line 277
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
#define FT_BEGIN_STMNT do { #define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 ) #define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
/* Provide assembler fragments for performance-critical functions. */ /* Provide assembler fragments for performance-critical functions. */
/* These must be defined `static __inline__' with GCC. */ /* These must be defined `static __inline__' with GCC. */
#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
__asm
{
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
mov a, t, asr #31 /* a = (hi >> 31) */
add a, a, #0x8000 /* a += 0x8000 */
adds t2, t2, a /* t2 += a */
adc t, t, #0 /* t += carry */
mov a, t2, lsr #16 /* a = t2 >> 16 */
orr a, a, t, lsl #16 /* a |= t << 16 */
}
return a;
}
#endif /* __CC_ARM || __ARMCC__ */
#ifdef __GNUC__ #ifdef __GNUC__
#if defined( __arm__ ) && !defined( __thumb__ ) #if defined( __arm__ ) && !defined( __thumb__ ) && \
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm #define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline__ FT_Int32 static __inline__ FT_Int32
FT_MulFix_arm( FT_Int32 a, FT_MulFix_arm( FT_Int32 a,
FT_Int32 b ) FT_Int32 b )
{ {
register FT_Int32 t, t2; register FT_Int32 t, t2;
__asm__ __volatile__ ( __asm__ __volatile__ (
"smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
"mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
"adds %1, %1, %0\n\t" /* %1 += %0 */ "adds %1, %1, %0\n\t" /* %1 += %0 */
"adc %2, %2, #0\n\t" /* %2 += carry */ "adc %2, %2, #0\n\t" /* %2 += carry */
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
"orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t) : "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b) ); : "r"(a), "r"(b) );
return a; return a;
} }
#endif /* __arm__ && !__thumb__ */ #endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
#if defined( i386 ) #if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline__ FT_Int32 static __inline__ FT_Int32
FT_MulFix_i386( FT_Int32 a, FT_MulFix_i386( FT_Int32 a,
FT_Int32 b ) FT_Int32 b )
{ {
register FT_Int32 result; register FT_Int32 result;
__asm__ __volatile__ ( __asm__ __volatile__ (
"imul %%edx\n" "imul %%edx\n"
"movl %%edx, %%ecx\n" "movl %%edx, %%ecx\n"
"sarl $31, %%ecx\n" "sarl $31, %%ecx\n"
"addl $0x8000, %%ecx\n" "addl $0x8000, %%ecx\n"
"addl %%ecx, %%eax\n" "addl %%ecx, %%eax\n"
"adcl $0, %%edx\n" "adcl $0, %%edx\n"
"shrl $16, %%eax\n" "shrl $16, %%eax\n"
"shll $16, %%edx\n" "shll $16, %%edx\n"
"addl %%edx, %%eax\n" "addl %%edx, %%eax\n"
: "=a"(result), "+d"(b) : "=a"(result), "=d"(b)
: "a"(a) : "a"(a), "d"(b)
: "%ecx" ); : "%ecx", "cc" );
return result; return result;
} }
#endif /* i386 */ #endif /* i386 */
#endif /* __GNUC__ */ #endif /* __GNUC__ */
#ifdef _MSC_VER /* Visual C++ */
#ifdef _M_IX86
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline FT_Int32
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 result;
__asm
{
mov eax, a
mov edx, b
imul edx
mov ecx, edx
sar ecx, 31
add ecx, 8000h
add eax, ecx
adc edx, 0
shr eax, 16
shl edx, 16
add eax, edx
mov result, eax
}
return result;
}
#endif /* _M_IX86 */
#endif /* _MSC_VER */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ #endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX #ifdef FT_CONFIG_OPTION_INLINE_MULFIX
#ifdef FT_MULFIX_ASSEMBLER #ifdef FT_MULFIX_ASSEMBLER
#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER #define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
#endif #endif
#endif #endif
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
 End of changes. 11 change blocks. 
7 lines changed or deleted 79 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/