]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Generate invalid exception correctly.
authorUlrich Drepper <drepper@redhat.com>
Wed, 21 May 1997 00:03:54 +0000 (00:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 21 May 1997 00:03:54 +0000 (00:03 +0000)
sysdeps/libm-i387/e_pow.S
sysdeps/libm-i387/e_powf.S
sysdeps/libm-i387/e_powl.S

index e665326438fcbadb8726e8d251184008809d85af..45c41b48ab39e6ad2e83b9b6906a50fd51124a47 100644 (file)
@@ -48,9 +48,6 @@ one:  .double 1.0
        ASM_TYPE_DIRECTIVE(limit,@object)
 limit: .double 0.29
        ASM_SIZE_DIRECTIVE(limit)
-       ASM_TYPE_DIRECTIVE(nan,@object)
-nan:   .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-       ASM_SIZE_DIRECTIVE(nan)
 
 #ifdef PIC
 #define MO(op) op##@GOTOFF(%ecx)
@@ -191,8 +188,8 @@ ENTRY(__ieee754_pow)
        ret
 
        .align ALIGNARG(4)
-14:    fldl    MO(nan)
-       faddl   MO(zero)        // raise invalid exception
+14:    fldl    MO(infinity)
+       fmull   MO(zero)        // raise invalid exception
        ret
 
        .align ALIGNARG(4)
index 102cd4e3af9d76041cac4bb2e397b35be074f7d4..d7342bf56f6cd4bc7b0ed4d4d362fec704126a20 100644 (file)
@@ -48,9 +48,6 @@ one:  .double 1.0
        ASM_TYPE_DIRECTIVE(limit,@object)
 limit: .double 0.29
        ASM_SIZE_DIRECTIVE(limit)
-       ASM_TYPE_DIRECTIVE(nan,@object)
-nan:   .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-       ASM_SIZE_DIRECTIVE(nan)
 
 #ifdef PIC
 #define MO(op) op##@GOTOFF(%ecx)
@@ -187,8 +184,8 @@ ENTRY(__ieee754_powf)
        ret
 
        .align ALIGNARG(4)
-14:    fldl    MO(nan)
-       faddl   MO(zero)        // raise invalid exception
+14:    fldl    MO(infinity)
+       fmull   MO(zero)        // raise invalid exception
        ret
 
        .align ALIGNARG(4)
index 3cfb96b213ae8fbe43ee69be268e185193341796..0ea482982284269fd0e83bb6a0c9c8a0e9c59889 100644 (file)
@@ -48,9 +48,6 @@ one:  .double 1.0
        ASM_TYPE_DIRECTIVE(limit,@object)
 limit: .double 0.29
        ASM_SIZE_DIRECTIVE(limit)
-       ASM_TYPE_DIRECTIVE(nan,@object)
-nan:   .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-       ASM_SIZE_DIRECTIVE(nan)
 
 #ifdef PIC
 #define MO(op) op##@GOTOFF(%ecx)
@@ -64,6 +61,13 @@ nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
 ENTRY(__ieee754_powl)
        fldt    16(%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 +80,6 @@ ENTRY(__ieee754_powl)
        cmpb    $0x01, %ah      // is y == NaN ?
        je      30f
 
-#ifdef PIC
-       call    1f
-1:     popl    %ecx
-       addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
-#endif
-
        fldt    4(%esp)         // x : y
 
        subl    $8,%esp
@@ -190,8 +188,8 @@ ENTRY(__ieee754_powl)
        ret
 
        .align ALIGNARG(4)
-14:    fldl    MO(nan)
-       faddl   MO(zero)        // raise invalid exception
+14:    fldl    MO(infinity)
+       fmull   MO(zero)        // raise invalid exception
        ret
 
        .align ALIGNARG(4)