]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Correct recognition of mantissa overflow.
authorUlrich Drepper <drepper@redhat.com>
Thu, 20 Mar 1997 03:20:56 +0000 (03:20 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 20 Mar 1997 03:20:56 +0000 (03:20 +0000)
sysdeps/libm-i387/e_pow.S
sysdeps/libm-i387/e_powf.S

index efe184168b0859e27b7f11731e9850fa8b256420..e665326438fcbadb8726e8d251184008809d85af 100644 (file)
@@ -64,6 +64,13 @@ nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
 ENTRY(__ieee754_pow)
        fldl    12(%esp)        // y
        fxam
+
+#ifdef PIC
+       call    1f
+1:     popl    %ecx
+       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
+#endif
+
        fnstsw
        movb    %ah, %dl
        andb    $0x45, %ah
@@ -76,12 +83,6 @@ ENTRY(__ieee754_pow)
        cmpb    $0x01, %ah      // is y == NaN ?
        je      30f
 
-#ifdef PIC
-       call    1f
-1:     popl    %ecx
-       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
-#endif
-
        fldl    4(%esp)         // x : y
 
        subl    $8,%esp
@@ -307,7 +308,7 @@ ENTRY(__ieee754_pow)
        andb    $1, %al
        jz      24f             // jump if not odd
        cmpl    $0xffe00000, %edx
-       jbe     24f             // does not fit in mantissa bits
+       jae     24f             // does not fit in mantissa bits
        // It's an odd integer.
        fldl    MO(mzero)
        ret
index 54af93c96103157ad8d6b72cd9eaec489d046be5..102cd4e3af9d76041cac4bb2e397b35be074f7d4 100644 (file)
@@ -64,6 +64,13 @@ nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
 ENTRY(__ieee754_powf)
        flds    8(%esp) // y
        fxam
+
+#ifdef PIC
+       call    1f
+1:     popl    %ecx
+       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
+#endif
+
        fnstsw
        movb    %ah, %dl
        andb    $0x45, %ah
@@ -76,12 +83,6 @@ ENTRY(__ieee754_powf)
        cmpb    $0x01, %ah      // is y == NaN ?
        je      30f
 
-#ifdef PIC
-       call    1f
-1:     popl    %ecx
-       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
-#endif
-
        flds    4(%esp)         // x : y
 
        subl    $4, %esp
@@ -299,7 +300,7 @@ ENTRY(__ieee754_powf)
        testb   $1, %dl
        jz      24f             // jump if not odd
        cmpl    $0xff000000, %edx
-       jbe     24f             // does not fit in mantissa bits
+       jae     24f             // does not fit in mantissa bits
        // It's an odd integer.
        fldl    MO(mzero)
        ret