aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@bitrange.com>2003-03-06 05:01:15 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2003-03-06 05:01:15 +0000
commit2b18b49bb8b3a4604aa4bbf835a82622a3cc2029 (patch)
treeb8415a8922312358320737f7ad36eb7cde949794 /gcc
parent1a71a5b03702dd3e1ffc748e2de469db5235fba6 (diff)
downloadgcc-2b18b49bb8b3a4604aa4bbf835a82622a3cc2029.zip
gcc-2b18b49bb8b3a4604aa4bbf835a82622a3cc2029.tar.gz
gcc-2b18b49bb8b3a4604aa4bbf835a82622a3cc2029.tar.bz2
mmix.md ("*movcc_expanded"): New pattern.
* config/mmix/mmix.md ("*movcc_expanded"): New pattern. ("movcc", "movcc_uns", "movcc_fp", "movcc_fpeq", "movcc_fun"): New expanders. From-SVN: r63887
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mmix/mmix.md49
2 files changed, 54 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4bcb2287..fa602d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-06 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/mmix/mmix.md ("*movcc_expanded"): New pattern.
+ ("movcc", "movcc_uns", "movcc_fp", "movcc_fpeq", "movcc_fun"): New
+ expanders.
+
2003-03-05 Roger Sayle <roger@eyesopen.com>
* expr.h (lang_expand_expr): Delete obsolete prototype.
diff --git a/gcc/config/mmix/mmix.md b/gcc/config/mmix/mmix.md
index dc7148f..e3623bd 100644
--- a/gcc/config/mmix/mmix.md
+++ b/gcc/config/mmix/mmix.md
@@ -1,5 +1,5 @@
;; GCC machine description for MMIX
-;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
;; Contributed by Hans-Peter Nilsson (hp@bitrange.com)
;; This file is part of GCC.
@@ -131,6 +131,53 @@
STOU %1,%0
%r0%I1")
+;; We need to be able to move around the values used as condition codes.
+;; First spotted as reported in
+;; <URL:http://gcc.gnu.org/ml/gcc-bugs/2003-03/msg00008.html> due to
+;; changes in loop optimization. The file machmode.def says they're of
+;; size 4 QI. Valid bit-patterns correspond to integers -1, 0 and 1, so
+;; we treat them as signed entities; see mmix-modes.def. The following
+;; expanders should cover all MODE_CC modes, and expand for this pattern.
+(define_insn "*movcc_expanded"
+ [(set (match_operand 0 "nonimmediate_operand" "=r,r,m")
+ (match_operand 1 "nonimmediate_operand" "r,m,r"))]
+ "GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_CC
+ && GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_CC"
+ "@
+ SET %0,%1
+ LDT %0,%1
+ STT %1,%0")
+
+(define_expand "movcc"
+ [(set (match_operand:CC 0 "nonimmediate_operand" "")
+ (match_operand:CC 1 "nonimmediate_operand" ""))]
+ ""
+ "")
+
+(define_expand "movcc_uns"
+ [(set (match_operand:CC_UNS 0 "nonimmediate_operand" "")
+ (match_operand:CC_UNS 1 "nonimmediate_operand" ""))]
+ ""
+ "")
+
+(define_expand "movcc_fp"
+ [(set (match_operand:CC_FP 0 "nonimmediate_operand" "")
+ (match_operand:CC_FP 1 "nonimmediate_operand" ""))]
+ ""
+ "")
+
+(define_expand "movcc_fpeq"
+ [(set (match_operand:CC_FPEQ 0 "nonimmediate_operand" "")
+ (match_operand:CC_FPEQ 1 "nonimmediate_operand" ""))]
+ ""
+ "")
+
+(define_expand "movcc_fun"
+ [(set (match_operand:CC_FUN 0 "nonimmediate_operand" "")
+ (match_operand:CC_FUN 1 "nonimmediate_operand" ""))]
+ ""
+ "")
+
(define_insn "adddi3"
[(set (match_operand:DI 0 "register_operand" "=r,r,r")
(plus:DI