Commit d55f9d23 by Nathan Sidwell

lb1sf68.asm (__divsf3, [...]): Return a correctly signed zero.

	* gcc/config/m68k/lb1sf68.asm (__divsf3, __divdf3, __mulsf3,
	__muldf3): Return a correctly signed zero.

From-SVN: r110744
parent bbbe4e7b
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> 2006-02-08 Paolo Bonzini <bonzini@gnu.org>
* passes.c (register_one_dump_file): Accept the current properties * passes.c (register_one_dump_file): Accept the current properties
...@@ -7,8 +12,9 @@ ...@@ -7,8 +12,9 @@
(register_dump_files_1): ... this one. Do not modify the pass (register_dump_files_1): ... this one. Do not modify the pass
structure. structure.
(next_pass_1): Cosmetic fix. (next_pass_1): Cosmetic fix.
(execute_todo): Keep second parameter only. Use curr_properties instead (execute_todo): Keep second parameter only. Use curr_properties
of fetching it from the pass structure. Check and set last_verified. instead of fetching it from the pass structure. Check and set
last_verified.
(execute_one_pass): Handle TODO_set_props. Use curr_properties (execute_one_pass): Handle TODO_set_props. Use curr_properties
instead of fetching it from the pass structure. Fix calls to instead of fetching it from the pass structure. Fix calls to
execute_todo. Update curr_properties and initialize .vcg RTL dump execute_todo. Update curr_properties and initialize .vcg RTL dump
......
...@@ -1671,16 +1671,16 @@ Lmuldf$b$0: ...@@ -1671,16 +1671,16 @@ Lmuldf$b$0:
#ifndef __mcoldfire__ #ifndef __mcoldfire__
exg d2,d0 | put b (==0) into d0-d1 exg d2,d0 | put b (==0) into d0-d1
exg d3,d1 | and a (with sign bit cleared) into d2-d3 exg d3,d1 | and a (with sign bit cleared) into d2-d3
movel a0,d0 | set result sign
#else #else
movel d2,d7 movel d0,d2 | put a into d2-d3
movel d0,d2
movel d7,d0
movel d3,d7
movel d1,d3 movel d1,d3
movel d7,d1 movel a0,d0 | put result zero into d0-d1
movq IMM(0),d1
#endif #endif
bra 1f bra 1f
Lmuldf$a$0: Lmuldf$a$0:
movel a0,d0 | set result sign
movel a6@(16),d2 | put b into d2-d3 again movel a6@(16),d2 | put b into d2-d3 again
movel a6@(20),d3 | movel a6@(20),d3 |
bclr IMM (31),d2 | clear sign bit bclr IMM (31),d2 | clear sign bit
...@@ -1958,7 +1958,7 @@ Ldivdf$inop: ...@@ -1958,7 +1958,7 @@ Ldivdf$inop:
Ldivdf$a$0: Ldivdf$a$0:
| If a is zero check to see whether b is zero also. In that case return | 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 | 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 moveq IMM (DIVIDE),d5
bclr IMM (31),d2 | bclr IMM (31),d2 |
movel d2,d4 | movel d2,d4 |
...@@ -1969,8 +1969,8 @@ Ldivdf$a$0: ...@@ -1969,8 +1969,8 @@ Ldivdf$a$0:
blt 1f | blt 1f |
tstl d3 | tstl d3 |
bne Ld$inop | bne Ld$inop |
1: movel IMM (0),d0 | else return zero 1: movel a0,d0 | else return signed zero
movel d0,d1 | moveq IMM(0),d1 |
PICLEA SYM (_fpCCR),a0 | clear exception flags PICLEA SYM (_fpCCR),a0 | clear exception flags
movew IMM (0),a0@ | movew IMM (0),a0@ |
#ifndef __mcoldfire__ #ifndef __mcoldfire__
...@@ -3230,7 +3230,6 @@ Lmulsf$inf: ...@@ -3230,7 +3230,6 @@ Lmulsf$inf:
| or NaN, in which case we return NaN. | or NaN, in which case we return NaN.
Lmulsf$b$0: Lmulsf$b$0:
| Here d1 (==b) is zero. | 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 movel a6@(8),d1 | get a again to check for non-finiteness
bra 1f bra 1f
Lmulsf$a$0: Lmulsf$a$0:
...@@ -3238,7 +3237,8 @@ Lmulsf$a$0: ...@@ -3238,7 +3237,8 @@ Lmulsf$a$0:
1: bclr IMM (31),d1 | clear sign bit 1: bclr IMM (31),d1 | clear sign bit
cmpl IMM (INFINITY),d1 | and check for a large exponent cmpl IMM (INFINITY),d1 | and check for a large exponent
bge Lf$inop | if b is +/-INFINITY or NaN return NaN 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@ | movew IMM (0),a0@ |
#ifndef __mcoldfire__ #ifndef __mcoldfire__
moveml sp@+,d2-d7 | moveml sp@+,d2-d7 |
...@@ -3432,12 +3432,12 @@ Ldivsf$a$0: ...@@ -3432,12 +3432,12 @@ Ldivsf$a$0:
moveq IMM (DIVIDE),d5 moveq IMM (DIVIDE),d5
| If a is zero check to see whether b is zero also. In that case return | 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 | 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 andl IMM (0x7fffffff),d1 | clear sign bit and test b
beq Lf$inop | if b is also zero return NaN beq Lf$inop | if b is also zero return NaN
cmpl IMM (INFINITY),d1 | check for NaN cmpl IMM (INFINITY),d1 | check for NaN
bhi Lf$inop | bhi Lf$inop |
movel IMM (0),d0 | else return zero movel d7,d0 | else return signed zero
PICLEA SYM (_fpCCR),a0 | PICLEA SYM (_fpCCR),a0 |
movew IMM (0),a0@ | movew IMM (0),a0@ |
#ifndef __mcoldfire__ #ifndef __mcoldfire__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment