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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/fdimf.c
          +++ new/usr/src/lib/libm/common/m9x/fdimf.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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   23   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24   24   */
       25 +
  25   26  /*
  26   27   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27   28   * Use is subject to license terms.
  28   29   */
  29   30  
  30   31  #pragma weak fdimf = __fdimf
  31   32  
  32      -#include "libm.h"       /* for islessequal macro */
       33 +#include "libm.h"                       /* for islessequal macro */
  33   34  
  34   35  float
  35      -__fdimf(float x, float y) {
       36 +__fdimf(float x, float y)
       37 +{
  36   38          /*
  37   39           * On SPARC v8plus/v9, this could be implemented as follows
  38   40           * (assuming %f0 = x, %f1 = y, return value left in %f0):
  39   41           *
  40   42           * fcmps        %fcc0,%f0,%f1
  41   43           * st           %g0,[scratch]   ! use fzero instead of st/ld
  42   44           * ld           [scratch],%f2   ! if VIS is available
  43   45           * fnegs        %f2,%f3
  44   46           * fmovsle      %fcc0,%f2,%f0
  45   47           * fmovsle      %fcc0,%f3,%f1
  46   48           * fsubs        %f0,%f1,%f0
  47   49           */
  48   50          if (islessequal(x, y)) {
  49   51                  x = 0.0f;
  50   52                  y = -x;
  51   53          }
       54 +
  52   55          return (x - y);
  53   56  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX