36#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
40#if defined( __CC_ARM ) || defined( __ARMCC__ )
42#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
46 static __inline FT_Int32
47 FT_MulFix_arm( FT_Int32
a,
71#if defined( __arm__ ) && \
72 ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \
73 !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
75#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
79 static __inline__ FT_Int32
80 FT_MulFix_arm( FT_Int32
a,
87 "smull %1, %2, %4, %3\n\t"
88 "mov %0, %2, asr #31\n\t"
89#
if defined( __clang__ ) && defined( __thumb2__ )
90 "add.w %0, %0, #0x8000\n\t"
92 "add %0, %0, #0x8000\n\t"
96 "mov %0, %1, lsr #16\n\t"
97 "orr %0, %0, %2, lsl #16\n\t"
98 :
"=r"(
a),
"=&r"(t2),
"=&r"(
t)
109#if defined( __i386__ )
111#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
115 static __inline__ FT_Int32
116 FT_MulFix_i386( FT_Int32
a,
124 "movl %%edx, %%ecx\n"
126 "addl $0x8000, %%ecx\n"
127 "addl %%ecx, %%eax\n"
131 "addl %%edx, %%eax\n"
147#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
151 static __inline FT_Int32
152 FT_MulFix_i386( FT_Int32
a,
180#if defined( __GNUC__ ) && defined( __x86_64__ )
182#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64
184 static __inline__ FT_Int32
185 FT_MulFix_x86_64( FT_Int32
a,
190#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
191#pragma GCC diagnostic push
192#pragma GCC diagnostic ignored "-Wlong-long"
205 return (FT_Int32)(
ret >> 16 );
214 long long wide_a = (
long long)
a;
215 long long wide_b = (
long long)
b;
223 "lea 0x8000(%1, %0), %0\n"
225 :
"=&r"(
result),
"=&r"(wide_a)
232#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
233#pragma GCC diagnostic pop
242#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
243#ifdef FT_MULFIX_ASSEMBLER
244#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )
343#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
344#if defined( __GNUC__ ) && \
345 ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )
347#if FT_SIZEOF_INT == 4
349#define FT_MSB( x ) ( 31 - __builtin_clz( x ) )
351#elif FT_SIZEOF_LONG == 4
353#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) )
397 FT_SqrtFixed( FT_Int32
x );
402#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) * 64 )
403#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) * 16384 )
404#define INT_TO_FIXED( x ) ( (FT_Long)(x) * 65536 )
405#define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) * 4 )
406#define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 )
408#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \
409 : ( -( ( 32 - (x) ) & -64 ) ) )
420#define ADD_LONG( a, b ) \
421 (FT_Long)( (FT_ULong)(a) + (FT_ULong)(b) )
422#define SUB_LONG( a, b ) \
423 (FT_Long)( (FT_ULong)(a) - (FT_ULong)(b) )
424#define MUL_LONG( a, b ) \
425 (FT_Long)( (FT_ULong)(a) * (FT_ULong)(b) )
426#define NEG_LONG( a ) \
427 (FT_Long)( (FT_ULong)0 - (FT_ULong)(a) )
429#define ADD_INT32( a, b ) \
430 (FT_Int32)( (FT_UInt32)(a) + (FT_UInt32)(b) )
431#define SUB_INT32( a, b ) \
432 (FT_Int32)( (FT_UInt32)(a) - (FT_UInt32)(b) )
433#define MUL_INT32( a, b ) \
434 (FT_Int32)( (FT_UInt32)(a) * (FT_UInt32)(b) )
435#define NEG_INT32( a ) \
436 (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
ft_corner_is_flat(FT_Pos in_x, FT_Pos in_y, FT_Pos out_x, FT_Pos out_y)
FT_BEGIN_HEADER FT_MulDiv_No_Round(FT_Long a, FT_Long b, FT_Long c)
FT_Vector_NormLen(FT_Vector *vector)
FT_Vector_Transform_Scaled(FT_Vector *vector, const FT_Matrix *matrix, FT_Long scaling)
FT_Matrix_Multiply_Scaled(const FT_Matrix *a, FT_Matrix *b, FT_Long scaling)
FT_Hypot(FT_Fixed x, FT_Fixed y)
ft_corner_orientation(FT_Pos in_x, FT_Pos in_y, FT_Pos out_x, FT_Pos out_y)
FT_BEGIN_HEADER typedef signed long FT_Pos
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat GLfloat h
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl eax
ecx edi movl ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx