summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-20 03:06:25 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-20 03:06:25 +0000
commit8fd007d79a04ea4bbd244c755a366b33198fd8cd (patch)
treeefd31f86a99ed9e398c49c538f5d9db14f66ac53 /gcc
parent5a5748d4102955bfc29fcd159b1ed5622479af05 (diff)
downloadppe42-gcc-8fd007d79a04ea4bbd244c755a366b33198fd8cd.tar.gz
ppe42-gcc-8fd007d79a04ea4bbd244c755a366b33198fd8cd.zip
* config/mmix/mmix.md ("negdf2"): Rewrite.
("*expanded_negdf2"): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mmix/mmix.md17
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0b22646cb6c..24967792239 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-20 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/mmix/mmix.md ("negdf2"): Rewrite.
+ ("*expanded_negdf2"): New.
+
2002-09-19 Jim Wilson <wilson@redhat.com>
* combine.c (simplify_set): When optimizing a subreg src with a
diff --git a/gcc/config/mmix/mmix.md b/gcc/config/mmix/mmix.md
index 0f368729312..d234d8c9cb6 100644
--- a/gcc/config/mmix/mmix.md
+++ b/gcc/config/mmix/mmix.md
@@ -348,13 +348,22 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
""
"NEGU %0,0,%1")
-;; FIXME: GCC should be able to synthesize this by itself as "0.0 - x".
(define_expand "negdf2"
+ [(parallel [(set (match_operand:DF 0 "register_operand" "=r")
+ (neg:DF (match_operand:DF 1 "register_operand" "r")))
+ (use (match_dup 2))])]
+ ""
+{
+ /* Emit bit-flipping sequence to be IEEE-safe wrt. -+0. */
+ operands[2] = force_reg (DImode, GEN_INT ((HOST_WIDE_INT) 1 << 63));
+})
+
+(define_insn "*expanded_negdf2"
[(set (match_operand:DF 0 "register_operand" "=r")
- (minus:DF (match_dup 2)
- (match_operand:DF 1 "register_operand" "r")))]
+ (neg:DF (match_operand:DF 1 "register_operand" "r")))
+ (use (match_operand:DI 2 "register_operand" "r"))]
""
- "operands[2] = force_reg (DFmode, CONST0_RTX (DFmode));")
+ "XOR %0,%1,%2")
;; FIXME: define_expand for absdi2?
OpenPOWER on IntegriCloud