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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/fenv_inlines.h
          +++ new/usr/src/lib/libm/common/m9x/fenv_inlines.h
↓ open down ↓ 9 lines elided ↑ open up ↑
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2011, Richard Lowe
  14   14   */
  15   15  
  16   16  #ifndef _FENV_INLINES_H
  17   17  #define _FENV_INLINES_H
  18   18  
  19   19  #ifdef __GNUC__
  20      -
  21   20  #ifdef __cplusplus
  22   21  extern "C" {
  23   22  #endif
  24   23  
  25   24  #include <sys/types.h>
  26   25  
  27   26  #if defined(__x86)
  28      -
  29   27  /*
  30   28   * Floating point Control Word and Status Word
  31   29   * Definition should actually be shared with x86
  32   30   * (much of this 'amd64' code can be, in fact.)
  33   31   */
  34   32  union fp_cwsw {
  35   33          uint32_t cwsw;
  36   34          struct {
  37   35                  uint16_t cw;
  38   36                  uint16_t sw;
↓ open down ↓ 22 lines elided ↑ open up ↑
  61   59          __asm__ __volatile__(
  62   60              "fstenv %0\n\t"
  63   61              "movw   %4,%1\n\t"
  64   62              "movw   %3,%2\n\t"
  65   63              "fldenv %0\n\t"
  66   64              "fwait\n\t"
  67   65              : "=m" (fenv), "=m" (fenv[0]), "=m" (fenv[2])
  68   66              : "r" (cwsw.words.cw), "r" (cwsw.words.sw)
  69   67              /* For practical purposes, we clobber the whole FPU */
  70   68              : "cc", "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)",
  71      -              "st(6)", "st(7)");
       69 +            "st(6)", "st(7)");
  72   70  }
  73   71  
  74   72  extern __GNU_INLINE void
  75   73  __fenv_getmxcsr(unsigned int *value)
  76   74  {
  77   75          __asm__ __volatile__("stmxcsr %0" : "=m" (*value));
  78   76  }
  79   77  
  80   78  extern __GNU_INLINE void
  81   79  __fenv_setmxcsr(const unsigned int *value)
↓ open down ↓ 336 lines elided ↑ open up ↑
 418  416  sse_cvtss2siq(float *f1, long long *ll1)
 419  417  {
 420  418          uint64_t tmp;
 421  419  
 422  420          __asm__ __volatile__(
 423  421              "cvtss2siq %2, %1\n\t"
 424  422              "movq      %1, %0"
 425  423              : "=m" (*ll1), "=r" (tmp)
 426  424              : "m" (*f1));
 427  425  }
 428      -
 429  426  #endif
 430  427  
 431  428  extern __GNU_INLINE void
 432  429  sse_cmpeqsd(double *d1, double *d2, long long *ll1)
 433  430  {
 434  431          __asm__ __volatile__(
 435  432              "cmpeqsd %2,%1\n\t"
 436  433              "movsd   %1,%0"
 437  434              : "=m" (*ll1), "+x" (*d1)
 438  435              : "x" (*d2));
↓ open down ↓ 191 lines elided ↑ open up ↑
 630  627  {
 631  628          uint64_t tmp;
 632  629  
 633  630          __asm__ __volatile__(
 634  631              "cvtsd2siq %2,%1\n\t"
 635  632              "movq      %1,%0"
 636  633              : "=m" (*ll1), "=r" (tmp)
 637  634              : "m" (*d1));
 638  635  }
 639  636  #endif
 640      -
 641  637  #elif defined(__sparc)
 642  638  extern __GNU_INLINE void
 643  639  __fenv_getfsr(unsigned long *l)
 644  640  {
 645  641          __asm__ __volatile__(
 646  642  #if defined(__sparcv9)
 647  643              "stx %%fsr,%0\n\t"
 648  644  #else
 649  645              "st  %%fsr,%0\n\t"
 650  646  #endif
↓ open down ↓ 23 lines elided ↑ open up ↑
 674  670  {
 675  671          __asm__ __volatile__("ld %0,%%fsr\n\t" : : "m" (*l));
 676  672  }
 677  673  #else
 678  674  #error "GCC FENV inlines not implemented for this platform"
 679  675  #endif
 680  676  
 681  677  #ifdef __cplusplus
 682  678  }
 683  679  #endif
 684      -
 685  680  #endif  /* __GNUC__ */
 686      -
 687  681  #endif /* _FENV_INLINES_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX