Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/amd64/src/ieee_funcl.s
          +++ new/usr/src/lib/libm/amd64/src/ieee_funcl.s
↓ open down ↓ 53 lines elided ↑ open up ↑
  54   54          ret
  55   55          .align  16
  56   56          SET_SIZE(isinfl)
  57   57  
  58   58          ENTRY(isnormall)
  59   59                                          / TRUE iff (x is finite, but
  60   60                                          /           neither subnormal nor zero)
  61   61                                          /      iff (msb(sgnfcnd(x) /= 0 
  62   62                                          /           &  0 < bexp(x) < 0x7fff)
  63   63          movl    12(%rsp),%eax           / eax <-- hi_32(sgnfcnd(x))
  64      -        movq    $0x80000000,%r8
  65      -        andq    %r8,%rax                / eax[31]  <-- msb(sgnfcnd(x)),
       64 +        andl    $-0x80000000,%eax       / eax[31]  <-- msb(sgnfcnd(x)),
  66   65                                          / rest_of(eax) <-- 0
  67   66          jz      .L8                     / jump iff msb(sgnfcnd(x)) = 0
  68   67          movl    16(%rsp),%eax           / ax <-- sign and bexp of x
  69   68          notl    %eax                    / ax[0..14] <-- not(bexp(x))
  70   69          andq    $0x7fff,%rax            / eax  <-- zero_xtnd(not(bexp(x)))
  71   70          jz      .L8                     / jump  iff bexp(x) = 0x7fff or 0
  72   71          xorq    $0x7fff,%rax            / treat pseudo-denormal as subnormal
  73   72          jz      .L8
  74   73          movq    $1,%rax
  75   74  .L8:
  76   75          ret
  77   76          .align  16
  78   77          SET_SIZE(isnormall)
  79   78  
  80   79          ENTRY(issubnormall)
  81   80                                          / TRUE iff (bexp(x) = 0 &
  82   81                                          / msb(sgnfcnd(x)) = 0 & frac(x) /= 0)
  83   82          movl    12(%rsp),%eax           / eax <-- hi_32(sgnfcnd(x))
  84   83          testl   $0x80000000,%eax        / eax[31] = msb(sgnfcnd(x));
  85      -                                        / set ZF if it is 0.
       84 +                                        / set ZF if it's 0.
  86   85          jz      .may_be_subnorm         / jump iff msb(sgnfcnd(x)) = 0
  87   86  .not_subnorm:
  88   87          movq    $0,%rax
  89   88          ret
  90   89  .may_be_subnorm:
  91   90          testl   $0x7fff,16(%rsp)        / set ZF iff bexp(x)  = 0
  92   91          jnz     .not_subnorm            / jump   iff bexp(x) /= 0
  93   92          orl     8(%rsp),%eax            / (eax) = 0 iff sgnfcnd(x) = 0
  94   93          jz      .not_subnorm
  95   94          movq    $1,%rax
↓ open down ↓ 28 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX