lb1sf68.asm (__divsf3, [...]): Return a correctly signed zero.
authorNathan Sidwell <nathan@gcc.gnu.org>
Wed, 8 Feb 2006 09:58:55 +0000 (09:58 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 8 Feb 2006 09:58:55 +0000 (09:58 +0000)
* gcc/config/m68k/lb1sf68.asm (__divsf3, __divdf3, __mulsf3,
__muldf3): Return a correctly signed zero.

From-SVN: r110744

gcc/ChangeLog
gcc/config/m68k/lb1sf68.asm

index 65180f3219c50384bf598b1278a527f5edd6fc00..fa18763855b7bac2308b1dc3ffcd8dfac1627599 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-08  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * gcc/config/m68k/lb1sf68.asm (__divsf3, __divdf3, __mulsf3,
+       __muldf3): Return a correctly signed zero.
+
 2006-02-08  Paolo Bonzini  <bonzini@gnu.org>
 
        * passes.c (register_one_dump_file): Accept the current properties
@@ -7,8 +12,9 @@
        (register_dump_files_1): ... this one.  Do not modify the pass
        structure.
        (next_pass_1): Cosmetic fix.
-       (execute_todo): Keep second parameter only.  Use curr_properties instead
-       of fetching it from the pass structure.  Check and set last_verified.
+       (execute_todo): Keep second parameter only.  Use curr_properties
+       instead of fetching it from the pass structure.  Check and set
+       last_verified.
        (execute_one_pass): Handle TODO_set_props.  Use curr_properties
        instead of fetching it from the pass structure.  Fix calls to
        execute_todo.  Update curr_properties and initialize .vcg RTL dump
index bc645b80442e2da4ae64b42f6eefdcfc11b7bcaf..716ff059d2532fb81dfa08f272ffcaae269ef8f1 100644 (file)
@@ -1671,16 +1671,16 @@ Lmuldf$b$0:
 #ifndef __mcoldfire__
        exg     d2,d0           | put b (==0) into d0-d1
        exg     d3,d1           | and a (with sign bit cleared) into d2-d3
+       movel   a0,d0           | set result sign
 #else
-       movel   d2,d7
-       movel   d0,d2
-       movel   d7,d0
-       movel   d3,d7
+       movel   d0,d2           | put a into d2-d3
        movel   d1,d3
-       movel   d7,d1
+       movel   a0,d0           | put result zero into d0-d1
+       movq    IMM(0),d1
 #endif
        bra     1f
 Lmuldf$a$0:
+       movel   a0,d0           | set result sign
        movel   a6@(16),d2      | put b into d2-d3 again
        movel   a6@(20),d3      |
        bclr    IMM (31),d2     | clear sign bit
@@ -1958,7 +1958,7 @@ Ldivdf$inop:
 Ldivdf$a$0:
 | If a is zero check to see whether b is zero also. In that case return
 | NaN; then check if b is NaN, and return NaN also in that case. Else
-| return zero.
+| return a properly signed zero.
        moveq   IMM (DIVIDE),d5
        bclr    IMM (31),d2     |
        movel   d2,d4           | 
@@ -1969,8 +1969,8 @@ Ldivdf$a$0:
        blt     1f              |
        tstl    d3              |
        bne     Ld$inop         |
-1:     movel   IMM (0),d0      | else return zero
-       movel   d0,d1           | 
+1:     movel   a0,d0           | else return signed zero
+       moveq   IMM(0),d1       | 
        PICLEA  SYM (_fpCCR),a0 | clear exception flags
        movew   IMM (0),a0@     |
 #ifndef __mcoldfire__
@@ -3230,7 +3230,6 @@ Lmulsf$inf:
 | or NaN, in which case we return NaN.
 Lmulsf$b$0:
 | Here d1 (==b) is zero.
-       movel   d1,d0           | put b into d0 (just a zero)
        movel   a6@(8),d1       | get a again to check for non-finiteness
        bra     1f
 Lmulsf$a$0:
@@ -3238,7 +3237,8 @@ Lmulsf$a$0:
 1:     bclr    IMM (31),d1     | clear sign bit 
        cmpl    IMM (INFINITY),d1 | and check for a large exponent
        bge     Lf$inop         | if b is +/-INFINITY or NaN return NaN
-       PICLEA  SYM (_fpCCR),a0 | else return zero
+       movel   d7,d0           | else return signed zero
+       PICLEA  SYM (_fpCCR),a0 |
        movew   IMM (0),a0@     | 
 #ifndef __mcoldfire__
        moveml  sp@+,d2-d7      | 
@@ -3432,12 +3432,12 @@ Ldivsf$a$0:
        moveq   IMM (DIVIDE),d5
 | If a is zero check to see whether b is zero also. In that case return
 | NaN; then check if b is NaN, and return NaN also in that case. Else
-| return zero.
+| return a properly signed zero.
        andl    IMM (0x7fffffff),d1     | clear sign bit and test b
        beq     Lf$inop                 | if b is also zero return NaN
        cmpl    IMM (INFINITY),d1       | check for NaN
        bhi     Lf$inop                 | 
-       movel   IMM (0),d0              | else return zero
+       movel   d7,d0                   | else return signed zero
        PICLEA  SYM (_fpCCR),a0         |
        movew   IMM (0),a0@             |
 #ifndef __mcoldfire__