fp-bit.c: Add NO_DENORMALS option

Bernd Schmidt bernds@balti.cygnus.co.uk
Wed Mar 15 11:00:00 GMT 2000


This adds the option of compiling fp-bit.c without support for denormals.
Currently, this is not used by any port in FSF gcc.

Bernd

	* fp-bit.c (unpack_d): If NO_DENORMALS is defined, anything with
	exponent 0 is a zero.

Index: fp-bit.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/fp-bit.c,v
retrieving revision 1.17
diff -c -p -r1.17 fp-bit.c
*** fp-bit.c	2000/02/26 20:24:45	1.17
--- fp-bit.c	2000/03/15 18:55:28
*************** Boston, MA 02111-1307, USA.  */
*** 113,119 ****
       US Software goFast library.  If this is not defined, the entry points use
       the same names as libgcc1.c.
     _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
!      two integers to the FLO_union_type.  
     NO_NANS: Disable nan and infinity handling
     SMALL_MACHINE: Useful when operations on QIs and HIs are faster
       than on an SI */
--- 113,120 ----
       US Software goFast library.  If this is not defined, the entry points use
       the same names as libgcc1.c.
     _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
!      two integers to the FLO_union_type.
!    NO_DENORMALS: Disable handling of denormals.
     NO_NANS: Disable nan and infinity handling
     SMALL_MACHINE: Useful when operations on QIs and HIs are faster
       than on an SI */
*************** unpack_d (FLO_union_type * src, fp_numbe
*** 615,621 ****
    if (exp == 0)
      {
        /* Hmm.  Looks like 0 */
!       if (fraction == 0)
  	{
  	  /* tastes like zero */
  	  dst->class = CLASS_ZERO;
--- 616,626 ----
    if (exp == 0)
      {
        /* Hmm.  Looks like 0 */
!       if (fraction == 0
! #ifdef NO_DENORMALS
! 	  || 1
! #endif
! 	  )
  	{
  	  /* tastes like zero */
  	  dst->class = CLASS_ZERO;



More information about the Gcc-patches mailing list