Home | History | Annotate | Line # | Download | only in arm
sfp-machine.h revision 1.1
      1 #define _FP_W_TYPE_SIZE		32
      2 #define _FP_W_TYPE		unsigned long
      3 #define _FP_WS_TYPE		signed long
      4 #define _FP_I_TYPE		long
      5 
      6 /* The type of the result of a floating point comparison.  This must
      7    match `__libgcc_cmp_return__' in GCC for the target.  */
      8 typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
      9 #define CMPtype __gcc_CMPtype
     10 
     11 #define _FP_MUL_MEAT_S(R,X,Y)				\
     12   _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
     13 #define _FP_MUL_MEAT_D(R,X,Y)				\
     14   _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
     15 #define _FP_MUL_MEAT_Q(R,X,Y)				\
     16   _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
     17 
     18 #define _FP_DIV_MEAT_S(R,X,Y)	_FP_DIV_MEAT_1_loop(S,R,X,Y)
     19 #define _FP_DIV_MEAT_D(R,X,Y)	_FP_DIV_MEAT_2_udiv(D,R,X,Y)
     20 #define _FP_DIV_MEAT_Q(R,X,Y)	_FP_DIV_MEAT_4_udiv(Q,R,X,Y)
     21 
     22 /* According to RTABI, QNAN is only with the most significant bit of the
     23    significand set, and all other significand bits zero.  */
     24 #define _FP_NANFRAC_H		_FP_QNANBIT_H
     25 #define _FP_NANFRAC_S		_FP_QNANBIT_S
     26 #define _FP_NANFRAC_D		_FP_QNANBIT_D, 0
     27 #define _FP_NANFRAC_Q		_FP_QNANBIT_Q, 0, 0, 0
     28 #define _FP_NANSIGN_H		0
     29 #define _FP_NANSIGN_S		0
     30 #define _FP_NANSIGN_D		0
     31 #define _FP_NANSIGN_Q		0
     32 
     33 #define _FP_KEEPNANFRACP 1
     34 
     35 /* Someone please check this.  */
     36 #define _FP_CHOOSENAN(fs, wc, R, X, Y, OP)			\
     37   do {								\
     38     if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)		\
     39 	&& !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs))	\
     40       {								\
     41 	R##_s = Y##_s;						\
     42 	_FP_FRAC_COPY_##wc(R,Y);				\
     43       }								\
     44     else							\
     45       {								\
     46 	R##_s = X##_s;						\
     47 	_FP_FRAC_COPY_##wc(R,X);				\
     48       }								\
     49     R##_c = FP_CLS_NAN;						\
     50   } while (0)
     51 
     52 #define	__LITTLE_ENDIAN	1234
     53 #define	__BIG_ENDIAN	4321
     54 
     55 #if defined __ARMEB__
     56 # define __BYTE_ORDER __BIG_ENDIAN
     57 #else
     58 # define __BYTE_ORDER __LITTLE_ENDIAN
     59 #endif
     60 
     61 
     62 /* Define ALIASNAME as a strong alias for NAME.  */
     63 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
     64 # define _strong_alias(name, aliasname) \
     65   extern __typeof (name) aliasname __attribute__ ((alias (#name)));
     66 
     67 #ifdef __ARM_EABI__
     68 /* Rename functions to their EABI names.  */
     69 /* The comparison functions need wrappers for EABI semantics, so
     70    leave them unmolested.  */
     71 #define __negsf2	__aeabi_fneg
     72 #define __subsf3	__aeabi_fsub
     73 #define __addsf3	__aeabi_fadd
     74 #define __floatunsisf	__aeabi_ui2f
     75 #define __floatsisf	__aeabi_i2f
     76 #define __floatundisf	__aeabi_ul2f
     77 #define __floatdisf	__aeabi_l2f
     78 #define __mulsf3	__aeabi_fmul
     79 #define __divsf3	__aeabi_fdiv
     80 #define __unordsf2	__aeabi_fcmpun
     81 #define __fixsfsi	__aeabi_f2iz
     82 #define __fixunssfsi	__aeabi_f2uiz
     83 #define __fixsfdi	__aeabi_f2lz
     84 #define __fixunssfdi	__aeabi_f2ulz
     85 #define __floatdisf	__aeabi_l2f
     86 
     87 #define __negdf2	__aeabi_dneg
     88 #define __subdf3	__aeabi_dsub
     89 #define __adddf3	__aeabi_dadd
     90 #define __floatunsidf	__aeabi_ui2d
     91 #define __floatsidf	__aeabi_i2d
     92 #define __extendsfdf2	__aeabi_f2d
     93 #define __truncdfsf2	__aeabi_d2f
     94 #define __floatundidf	__aeabi_ul2d
     95 #define __floatdidf	__aeabi_l2d
     96 #define __muldf3	__aeabi_dmul
     97 #define __divdf3	__aeabi_ddiv
     98 #define __unorddf2	__aeabi_dcmpun
     99 #define __fixdfsi	__aeabi_d2iz
    100 #define __fixunsdfsi	__aeabi_d2uiz
    101 #define __fixdfdi	__aeabi_d2lz
    102 #define __fixunsdfdi	__aeabi_d2ulz
    103 #define __floatdidf	__aeabi_l2d
    104 #define __extendhfsf2	__gnu_h2f_ieee
    105 #define __truncsfhf2	__gnu_f2h_ieee
    106 
    107 #endif /* __ARM_EABI__ */
    108