Print this page




  44         movq    $0,%rax
  45 .not_inf:
  46         ret
  47 
  48 .L6:                                    / here, (eax) = 0.0
  49         movl    12(%rsp),%ecx
  50         xorl    $0x80000000,%ecx        / handle unsupported implicitly
  51         orl     8(%rsp), %ecx
  52         jnz     .not_inf
  53         movq    $1,%rax
  54         ret
  55         .align  16
  56         SET_SIZE(isinfl)
  57 
  58         ENTRY(isnormall)
  59                                         / TRUE iff (x is finite, but
  60                                         /           neither subnormal nor zero)
  61                                         /      iff (msb(sgnfcnd(x) /= 0 
  62                                         /           &  0 < bexp(x) < 0x7fff)
  63         movl    12(%rsp),%eax           / eax <-- hi_32(sgnfcnd(x))
  64         movq    $0x80000000,%r8
  65         andq    %r8,%rax                / eax[31]  <-- msb(sgnfcnd(x)),
  66                                         / rest_of(eax) <-- 0
  67         jz      .L8                     / jump iff msb(sgnfcnd(x)) = 0
  68         movl    16(%rsp),%eax           / ax <-- sign and bexp of x
  69         notl    %eax                    / ax[0..14] <-- not(bexp(x))
  70         andq    $0x7fff,%rax            / eax  <-- zero_xtnd(not(bexp(x)))
  71         jz      .L8                     / jump  iff bexp(x) = 0x7fff or 0
  72         xorq    $0x7fff,%rax            / treat pseudo-denormal as subnormal
  73         jz      .L8
  74         movq    $1,%rax
  75 .L8:
  76         ret
  77         .align  16
  78         SET_SIZE(isnormall)
  79 
  80         ENTRY(issubnormall)
  81                                         / TRUE iff (bexp(x) = 0 &
  82                                         / msb(sgnfcnd(x)) = 0 & frac(x) /= 0)
  83         movl    12(%rsp),%eax           / eax <-- hi_32(sgnfcnd(x))
  84         testl   $0x80000000,%eax        / eax[31] = msb(sgnfcnd(x));
  85                                         / set ZF if it is 0.
  86         jz      .may_be_subnorm         / jump iff msb(sgnfcnd(x)) = 0
  87 .not_subnorm:
  88         movq    $0,%rax
  89         ret
  90 .may_be_subnorm:
  91         testl   $0x7fff,16(%rsp)        / set ZF iff bexp(x)  = 0
  92         jnz     .not_subnorm            / jump   iff bexp(x) /= 0
  93         orl     8(%rsp),%eax            / (eax) = 0 iff sgnfcnd(x) = 0
  94         jz      .not_subnorm
  95         movq    $1,%rax
  96         ret
  97         .align  16
  98         SET_SIZE(issubnormall)
  99 
 100         ENTRY(iszerol)
 101         movl    16(%rsp),%eax           / ax <-- sign and bexp of x
 102         andl    $0x7fff,%eax            / eax <-- zero_xtnd(bexp(x))
 103         jz      .may_be_zero            / jump iff bexp(x) = 0
 104 .not_zero:
 105         movq    $0,%rax


  44         movq    $0,%rax
  45 .not_inf:
  46         ret
  47 
  48 .L6:                                    / here, (eax) = 0.0
  49         movl    12(%rsp),%ecx
  50         xorl    $0x80000000,%ecx        / handle unsupported implicitly
  51         orl     8(%rsp), %ecx
  52         jnz     .not_inf
  53         movq    $1,%rax
  54         ret
  55         .align  16
  56         SET_SIZE(isinfl)
  57 
  58         ENTRY(isnormall)
  59                                         / TRUE iff (x is finite, but
  60                                         /           neither subnormal nor zero)
  61                                         /      iff (msb(sgnfcnd(x) /= 0 
  62                                         /           &  0 < bexp(x) < 0x7fff)
  63         movl    12(%rsp),%eax           / eax <-- hi_32(sgnfcnd(x))
  64         andl    $-0x80000000,%eax       / eax[31]  <-- msb(sgnfcnd(x)),

  65                                         / rest_of(eax) <-- 0
  66         jz      .L8                     / jump iff msb(sgnfcnd(x)) = 0
  67         movl    16(%rsp),%eax           / ax <-- sign and bexp of x
  68         notl    %eax                    / ax[0..14] <-- not(bexp(x))
  69         andq    $0x7fff,%rax            / eax  <-- zero_xtnd(not(bexp(x)))
  70         jz      .L8                     / jump  iff bexp(x) = 0x7fff or 0
  71         xorq    $0x7fff,%rax            / treat pseudo-denormal as subnormal
  72         jz      .L8
  73         movq    $1,%rax
  74 .L8:
  75         ret
  76         .align  16
  77         SET_SIZE(isnormall)
  78 
  79         ENTRY(issubnormall)
  80                                         / TRUE iff (bexp(x) = 0 &
  81                                         / msb(sgnfcnd(x)) = 0 & frac(x) /= 0)
  82         movl    12(%rsp),%eax           / eax <-- hi_32(sgnfcnd(x))
  83         testl   $0x80000000,%eax        / eax[31] = msb(sgnfcnd(x));
  84                                         / set ZF if it's 0.
  85         jz      .may_be_subnorm         / jump iff msb(sgnfcnd(x)) = 0
  86 .not_subnorm:
  87         movq    $0,%rax
  88         ret
  89 .may_be_subnorm:
  90         testl   $0x7fff,16(%rsp)        / set ZF iff bexp(x)  = 0
  91         jnz     .not_subnorm            / jump   iff bexp(x) /= 0
  92         orl     8(%rsp),%eax            / (eax) = 0 iff sgnfcnd(x) = 0
  93         jz      .not_subnorm
  94         movq    $1,%rax
  95         ret
  96         .align  16
  97         SET_SIZE(issubnormall)
  98 
  99         ENTRY(iszerol)
 100         movl    16(%rsp),%eax           / ax <-- sign and bexp of x
 101         andl    $0x7fff,%eax            / eax <-- zero_xtnd(bexp(x))
 102         jz      .may_be_zero            / jump iff bexp(x) = 0
 103 .not_zero:
 104         movq    $0,%rax