Print this page
11210 libm should be cstyle(1ONBLD) clean

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/C/libm_macros.h
          +++ new/usr/src/lib/libm/common/C/libm_macros.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
       21 +
  21   22  /*
  22   23   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23   24   */
       25 +
  24   26  /*
  25   27   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  26   28   * Use is subject to license terms.
  27   29   */
  28   30  
  29   31  #ifndef _LIBM_MACROS_H
  30   32  #define _LIBM_MACROS_H
  31   33  
  32   34  #include <sys/isa_defs.h>
  33   35  
  34   36  #if defined(__sparc)
  35      -
  36   37  #define HIWORD          0
  37   38  #define LOWORD          1
  38   39  #define HIXWORD         0               /* index of int containing exponent */
  39   40  #define XSGNMSK         0x80000000      /* exponent bit mask within the int */
  40   41  #define XBIASED_EXP(x)  ((((int *)&x)[HIXWORD] & ~0x80000000) >> 16)
  41   42  #define ISZEROL(x)      (((((int *)&x)[0] & ~XSGNMSK) | ((int *)&x)[1] | \
  42      -                                ((int *)&x)[2] | ((int *)&x)[3]) == 0)
  43      -
       43 +        ((int *)&x)[2] | ((int *)&x)[3]) == 0)
  44   44  #elif defined(__x86)
  45      -
  46   45  #define HIWORD          1
  47   46  #define LOWORD          0
  48   47  #define HIXWORD         2
  49   48  #define XSGNMSK         0x8000
  50   49  #define XBIASED_EXP(x)  (((int *)&x)[HIXWORD] & 0x7fff)
  51   50  #define ISZEROL(x)      (x == 0.0L)
  52   51  
  53   52  #define HANDLE_UNSUPPORTED
  54   53  
  55   54  /*
  56   55   * "convert" the high-order 32 bits of a SPARC quad precision
  57   56   * value ("I") to the sign, exponent, and high-order bits of an
  58   57   * x86 extended double precision value ("E"); the low-order bits
  59   58   * in the 12-byte quantity are left intact
  60   59   */
  61      -#define ITOX(I, E)       \
  62      -                E[2] = 0xffff & ((I) >> 16); \
  63      -                E[1] = (((I) & 0x7fff0000) == 0)? \
  64      -                    (E[1] & 0x7fff) | (0x7fff8000 & ((I) << 15)) :\
  65      -                    0x80000000 | (E[1] & 0x7fff) | (0x7fff8000 & ((I) << 15))
       60 +#define ITOX(I, E) \
       61 +        E[2] = 0xffff & ((I) >> 16); \
       62 +        E[1] = (((I) & 0x7fff0000) == 0) ? (E[1] & 0x7fff) | (0x7fff8000 & \
       63 +        ((I) << 15)) : 0x80000000 | (E[1] & 0x7fff) | (0x7fff8000 & ((I) << \
       64 +        15))
  66   65  
  67   66  /*
  68   67   * "convert" the sign, exponent, and high-order bits of an x86
  69   68   * extended double precision value ("E") to the high-order 32 bits
  70   69   * of a SPARC quad precision value ("I")
  71   70   */
  72      -#define XTOI(E, I)      \
  73      -                I = ((E[2]<<16) | (0xffff & (E[1]>>15)))
  74      -
       71 +#define XTOI(E, I) \
       72 +        I = ((E[2] << 16) | (0xffff & (E[1] >> 15)))
  75   73  #else
  76   74  #error Unknown architecture
  77   75  #endif
  78      -
  79      -#endif  /* _LIBM_MACROS_H */
       76 +#endif /* _LIBM_MACROS_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX