From: Hans-Peter Nilsson Date: Fri, 20 Sep 2002 03:06:25 +0000 (+0000) Subject: mmix.md ("negdf2"): Rewrite. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ee3db619b283cd330c9f88d28107a1f90f237fb;p=gcc.git mmix.md ("negdf2"): Rewrite. * config/mmix/mmix.md ("negdf2"): Rewrite. ("*expanded_negdf2"): New. From-SVN: r57332 --- 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 + + * config/mmix/mmix.md ("negdf2"): Rewrite. + ("*expanded_negdf2"): New. + 2002-09-19 Jim Wilson * 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?