OSDN Git Service

cp/:
[pf3gnuchains/gcc-fork.git] / gcc / config / fp-bit.h
index e9e1e97..3638cc5 100644 (file)
@@ -1,30 +1,26 @@
 /* Header file for fp-bit.c.  */
-/* Copyright (C) 2000, 2002, 2003
-   Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2006, 2009 Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
 
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
 
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
 
-/* As a special exception, if you link this library with other files,
-   some of which are compiled with GCC, to produce an executable,
-   this library does not by itself cause the resulting executable
-   to be covered by the GNU General Public License.
-   This exception does not however invalidate any other reasons why
-   the executable file might be covered by the GNU General Public License.  */
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
 
 #ifndef GCC_FP_BIT_H
 #define GCC_FP_BIT_H
@@ -88,7 +84,9 @@ Boston, MA 02111-1307, USA.  */
 #endif /* ! FINE_GRAINED_LIBRARIES */
 
 #if __LDBL_MANT_DIG__ == 113 || __LDBL_MANT_DIG__ == 106
-# define TMODES
+# if defined(TFLOAT) || defined(L_sf_to_tf) || defined(L_df_to_tf)
+#  define TMODES
+# endif
 #endif
 
 typedef float SFtype __attribute__ ((mode (SF)));
@@ -104,9 +102,10 @@ typedef int DItype __attribute__ ((mode (DI)));
 typedef int TItype __attribute__ ((mode (TI)));
 #endif
 
-/* The type of the result of a fp compare */
+/* The type of the result of a floating point comparison.  This must
+   match `__libgcc_cmp_return__' in GCC for the target.  */
 #ifndef CMPtype
-#define CMPtype SItype
+typedef int CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #endif
 
 typedef unsigned int UHItype __attribute__ ((mode (HI)));
@@ -319,7 +318,7 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
 #endif
 
 /* Preserve the sticky-bit when shifting fractions to the right.  */
-#define LSHIFT(a) { a = (a & 1) | (a >> 1); }
+#define LSHIFT(a, s) { a = (a >> s) | !!(a & (((fractype) 1 << s) - 1)); }
 
 /* numeric parameters */
 /* F_D_BITOFF is the number of bits offset between the MSB of the mantissa
@@ -411,10 +410,10 @@ typedef union
 }
 FLO_union_type;
 
-/* Prototypes */
+/* Prototypes */
 
 #if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
-extern FLO_type pack_d (fp_number_type *);
+extern FLO_type pack_d (const fp_number_type *);
 #endif
 
 extern void unpack_d (FLO_union_type *, fp_number_type *);
@@ -479,7 +478,7 @@ extern SItype float_to_si (FLO_type);
 #endif
 
 #if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
-#ifdef US_SOFTWARE_GOFAST
+#if defined(US_SOFTWARE_GOFAST) || defined(L_tf_to_usi)
 extern USItype float_to_usi (FLO_type);
 #endif
 #endif
@@ -521,6 +520,7 @@ extern TFtype df_to_tf (DFtype);
 #endif /* ! FLOAT */
 
 #ifdef TMODES
+extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype);
 extern TFtype __make_tp (fp_class_type, unsigned int, int, UTItype);
 #ifdef TFLOAT
 #if defined(L_tf_to_sf)