OSDN Git Service

* config/mmix/mmix.md ("*movcc_expanded"): New pattern.
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Mar 2003 05:01:15 +0000 (05:01 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Mar 2003 05:01:15 +0000 (05:01 +0000)
("movcc", "movcc_uns", "movcc_fp", "movcc_fpeq", "movcc_fun"): New
expanders.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63887 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mmix/mmix.md

index 4bcb228..fa602d4 100644 (file)
@@ -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.
index dc7148f..e3623bd 100644 (file)
@@ -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.
    STOU %1,%0
    %r0%I1")
 \f
+;; 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" ""))]
+  ""
+  "")
+\f
 (define_insn "adddi3"
   [(set (match_operand:DI 0 "register_operand" "=r,r,r")
        (plus:DI