VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   1) /* Software floating-point emulation.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   2)    Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   3)    This file is part of the GNU C Library.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   4)    Contributed by Richard Henderson (rth@cygnus.com),
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   5) 		  Jakub Jelinek (jj@ultra.linux.cz),
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   6) 		  David S. Miller (davem@redhat.com) and
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   7) 		  Peter Maydell (pmaydell@chiark.greenend.org.uk).
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   8) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700   9)    The GNU C Library is free software; you can redistribute it and/or
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  10)    modify it under the terms of the GNU Library General Public License as
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  11)    published by the Free Software Foundation; either version 2 of the
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  12)    License, or (at your option) any later version.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  13) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  14)    The GNU C Library is distributed in the hope that it will be useful,
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  15)    but WITHOUT ANY WARRANTY; without even the implied warranty of
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  16)    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  17)    Library General Public License for more details.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  18) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  19)    You should have received a copy of the GNU Library General Public
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  20)    License along with the GNU C Library; see the file COPYING.LIB.  If
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  21)    not, write to the Free Software Foundation, Inc.,
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  22)    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  23) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  24) #ifndef __MATH_EMU_SOFT_FP_H__
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  25) #define __MATH_EMU_SOFT_FP_H__
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  26) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  27) #include <asm/sfp-machine.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  28) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  29) /* Allow sfp-machine to have its own byte order definitions. */
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  30) #ifndef __BYTE_ORDER
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  31) #include <endian.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  32) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  33) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  34) #define _FP_WORKBITS		3
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  35) #define _FP_WORK_LSB		((_FP_W_TYPE)1 << 3)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  36) #define _FP_WORK_ROUND		((_FP_W_TYPE)1 << 2)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  37) #define _FP_WORK_GUARD		((_FP_W_TYPE)1 << 1)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  38) #define _FP_WORK_STICKY		((_FP_W_TYPE)1 << 0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  39) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  40) #ifndef FP_RND_NEAREST
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  41) # define FP_RND_NEAREST		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  42) # define FP_RND_ZERO		1
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  43) # define FP_RND_PINF		2
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  44) # define FP_RND_MINF		3
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  45) #ifndef FP_ROUNDMODE
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  46) # define FP_ROUNDMODE		FP_RND_NEAREST
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  47) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  48) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  49) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  50) /* By default don't care about exceptions. */
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  51) #ifndef FP_EX_INVALID
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  52) #define FP_EX_INVALID		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  53) #endif
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  54) #ifndef FP_EX_INVALID_SNAN
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  55) #define FP_EX_INVALID_SNAN	0
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  56) #endif
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  57) /* inf - inf */
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  58) #ifndef FP_EX_INVALID_ISI
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  59) #define FP_EX_INVALID_ISI	0
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  60) #endif
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  61) /* inf / inf */
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  62) #ifndef FP_EX_INVALID_IDI
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  63) #define FP_EX_INVALID_IDI	0
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  64) #endif
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  65) /* 0 / 0 */
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  66) #ifndef FP_EX_INVALID_ZDZ
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  67) #define FP_EX_INVALID_ZDZ	0
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  68) #endif
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  69) /* inf * 0 */
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  70) #ifndef FP_EX_INVALID_IMZ
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  71) #define FP_EX_INVALID_IMZ	0
48d6c64311ddb (Kumar Gala      2008-06-27 09:39:00 -0500  72) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  73) #ifndef FP_EX_OVERFLOW
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  74) #define FP_EX_OVERFLOW		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  75) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  76) #ifndef FP_EX_UNDERFLOW
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  77) #define FP_EX_UNDERFLOW		
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  78) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  79) #ifndef FP_EX_DIVZERO
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  80) #define FP_EX_DIVZERO		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  81) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  82) #ifndef FP_EX_INEXACT
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  83) #define FP_EX_INEXACT		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  84) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  85) #ifndef FP_EX_DENORM
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  86) #define FP_EX_DENORM		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  87) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  88) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  89) #ifdef _FP_DECL_EX
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  90) #define FP_DECL_EX					\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  91)   int _fex = 0;						\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  92)   _FP_DECL_EX
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  93) #else
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  94) #define FP_DECL_EX int _fex = 0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  95) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  96)   
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  97) #ifndef FP_INIT_ROUNDMODE
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  98) #define FP_INIT_ROUNDMODE do {} while (0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700  99) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 100) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 101) #ifndef FP_HANDLE_EXCEPTIONS
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 102) #define FP_HANDLE_EXCEPTIONS do {} while (0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 103) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 104) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 105) /* By default we never flush denormal input operands to signed zero. */
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 106) #ifndef FP_DENORM_ZERO
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 107) #define FP_DENORM_ZERO 0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 108) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 109) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 110) #ifndef FP_INHIBIT_RESULTS
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 111) /* By default we write the results always.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 112)  * sfp-machine may override this and e.g.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 113)  * check if some exceptions are unmasked
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 114)  * and inhibit it in such a case.
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 115)  */
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 116) #define FP_INHIBIT_RESULTS 0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 117) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 118) 
405849610fd96 (David S. Miller 2007-08-16 22:59:49 -0700 119) #ifndef FP_TRAPPING_EXCEPTIONS
2a67789618abb (Al Viro         2007-08-19 01:03:07 +0100 120) #define FP_TRAPPING_EXCEPTIONS 0
405849610fd96 (David S. Miller 2007-08-16 22:59:49 -0700 121) #endif
405849610fd96 (David S. Miller 2007-08-16 22:59:49 -0700 122) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 123) #define FP_SET_EXCEPTION(ex)				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 124)   _fex |= (ex)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 125)   
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 126) #define FP_UNSET_EXCEPTION(ex)				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 127)   _fex &= ~(ex)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 128) 
405849610fd96 (David S. Miller 2007-08-16 22:59:49 -0700 129) #define FP_CUR_EXCEPTIONS				\
405849610fd96 (David S. Miller 2007-08-16 22:59:49 -0700 130)   (_fex)
405849610fd96 (David S. Miller 2007-08-16 22:59:49 -0700 131) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 132) #define FP_CLEAR_EXCEPTIONS				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 133)   _fex = 0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 134) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 135) #define _FP_ROUND_NEAREST(wc, X)			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 136) do {							\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 137)     if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND)	\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 138)       _FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 139) } while (0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 140) 
83312f1b7ae20 (Vincent Chen    2018-11-22 11:14:38 +0800 141) #define _FP_ROUND_ZERO(wc, X)		(void)0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 142) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 143) #define _FP_ROUND_PINF(wc, X)				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 144) do {							\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 145)     if (!X##_s && (_FP_FRAC_LOW_##wc(X) & 7))		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 146)       _FP_FRAC_ADDI_##wc(X, _FP_WORK_LSB);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 147) } while (0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 148) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 149) #define _FP_ROUND_MINF(wc, X)				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 150) do {							\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 151)     if (X##_s && (_FP_FRAC_LOW_##wc(X) & 7))		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 152)       _FP_FRAC_ADDI_##wc(X, _FP_WORK_LSB);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 153) } while (0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 154) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 155) #define _FP_ROUND(wc, X)			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 156) do {						\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 157) 	if (_FP_FRAC_LOW_##wc(X) & 7)		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 158) 	  FP_SET_EXCEPTION(FP_EX_INEXACT);	\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 159) 	switch (FP_ROUNDMODE)			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 160) 	{					\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 161) 	  case FP_RND_NEAREST:			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 162) 	    _FP_ROUND_NEAREST(wc,X);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 163) 	    break;				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 164) 	  case FP_RND_ZERO:			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 165) 	    _FP_ROUND_ZERO(wc,X);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 166) 	    break;				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 167) 	  case FP_RND_PINF:			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 168) 	    _FP_ROUND_PINF(wc,X);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 169) 	    break;				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 170) 	  case FP_RND_MINF:			\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 171) 	    _FP_ROUND_MINF(wc,X);		\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 172) 	    break;				\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 173) 	}					\
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 174) } while (0)
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 175) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 176) #define FP_CLS_NORMAL		0
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 177) #define FP_CLS_ZERO		1
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 178) #define FP_CLS_INF		2
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 179) #define FP_CLS_NAN		3
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 180) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 181) #define _FP_CLS_COMBINE(x,y)	(((x) << 2) | (y))
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 182) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 183) #include <math-emu/op-1.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 184) #include <math-emu/op-2.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 185) #include <math-emu/op-4.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 186) #include <math-emu/op-8.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 187) #include <math-emu/op-common.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 188) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 189) /* Sigh.  Silly things longlong.h needs.  */
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 190) #define UWtype		_FP_W_TYPE
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 191) #define W_TYPE_SIZE	_FP_W_TYPE_SIZE
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 192) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 193) typedef int SItype __attribute__((mode(SI)));
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 194) typedef int DItype __attribute__((mode(DI)));
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 195) typedef unsigned int USItype __attribute__((mode(SI)));
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 196) typedef unsigned int UDItype __attribute__((mode(DI)));
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 197) #if _FP_W_TYPE_SIZE == 32
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 198) typedef unsigned int UHWtype __attribute__((mode(HI)));
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 199) #elif _FP_W_TYPE_SIZE == 64
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 200) typedef USItype UHWtype;
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 201) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 202) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 203) #ifndef umul_ppmm
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 204) #include <stdlib/longlong.h>
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 205) #endif
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 206) 
^1da177e4c3f4 (Linus Torvalds  2005-04-16 15:20:36 -0700 207) #endif /* __MATH_EMU_SOFT_FP_H__ */