Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/i386/src/locallibm.il
          +++ new/usr/src/lib/libm/i386/src/locallibm.il
↓ open down ↓ 209 lines elided ↑ open up ↑
 210  210          movw    4(%esp),%dx
 211  211          andw    $0xf3ff,%dx
 212  212          movw    (%esp),%cx
 213  213          andw    $0x0c00,%cx
 214  214          orw     %dx,%cx
 215  215          movw    %cx,(%esp)
 216  216          fldcw   (%esp)                  / restore RD
 217  217          addl    $8,%esp
 218  218          .end
 219  219  
 220      -/
 221      -/       branchless __isnan
 222      -/       ((0x7ff00000-[((lx|-lx)>>31)&1]|ahx)>>31)&1 = 1 iff x is NaN
 223      -/
 224      -        .inline __isnan,0
 225      -        movl    (%esp),%eax             /// eax <-- lo_32(x)
 226      -        movl    %eax,%ecx
 227      -        negl    %ecx                    / ecx <-- -lo_32(x)
 228      -        orl     %ecx,%eax
 229      -        shrl    $31,%eax                / 1 iff lx != 0
 230      -        movl    4(%esp),%ecx            /// ecx <-- hi_32(x)
 231      -        andl    $0x7fffffff,%ecx        / ecx <-- hi_32(abs(x))
 232      -        orl     %ecx,%eax
 233      -        subl    $0x7ff00000,%eax
 234      -        negl    %eax
 235      -        shrl    $31,%eax
 236      -        .end
 237      -
 238  220          .inline __isnanf,0
 239  221          movl    (%esp),%eax
 240  222          andl    $0x7fffffff,%eax
 241  223          negl    %eax
 242  224          addl    $0x7f800000,%eax
 243  225          shrl    $31,%eax
 244  226          .end
 245  227  
 246      -        .inline __isinf,0
 247      -        movl    4(%esp),%eax            / eax <-- hi_32(x)
 248      -        andl    $0x7fffffff,%eax        / set first bit to 0
 249      -        cmpl    $0x7ff00000,%eax
 250      -        pushfl
 251      -        popl    %eax
 252      -        cmpl    $0,(%esp)               / is lo_32(x) = 0?
 253      -        pushfl
 254      -        popl    %ecx                    / bit 6 of ecx <-- lo_32(x) == 0
 255      -        andl    %ecx,%eax
 256      -        andl    $0x40,%eax
 257      -        shrl    $6,%eax
 258      -        .end
 259  228  
 260  229          .inline __isnormal,0
 261  230                                          / TRUE iff (x is _finite, but
 262  231                                          /           neither subnormal nor +/-0)
 263  232                                          /      iff (0 < bexp(x) < 0x7ff)
 264  233          movl    4(%esp),%eax            / eax <-- hi_32(x)
 265  234          andl    $0x7ff00000,%eax        / eax[20..30]  <-- bexp(x),
 266  235                                          / rest_of(eax) <-- 0
 267  236          pushfl
 268  237          popl    %ecx                    / bit 6 of ecx <-- not bexp(x)
↓ open down ↓ 133 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX