summaryrefslogtreecommitdiff
path: root/gcc/config
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/config
parent5a5748d4102955bfc29fcd159b1ed5622479af05 (diff)
downloadgcc-8fd007d79a04ea4bbd244c755a366b33198fd8cd.tar.gz
* 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/config')
-rw-r--r--gcc/config/mmix/mmix.md17
1 files changed, 13 insertions, 4 deletions
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?