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
This commit is contained in:
Hans-Peter Nilsson 2003-03-06 05:01:15 +00:00 committed by Hans-Peter Nilsson
parent 1a71a5b037
commit 2b18b49bb8
2 changed files with 54 additions and 1 deletions

View 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> 2003-03-05 Roger Sayle <roger@eyesopen.com>
* expr.h (lang_expand_expr): Delete obsolete prototype. * expr.h (lang_expand_expr): Delete obsolete prototype.

View File

@ -1,5 +1,5 @@
;; GCC machine description for MMIX ;; 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) ;; Contributed by Hans-Peter Nilsson (hp@bitrange.com)
;; This file is part of GCC. ;; This file is part of GCC.
@ -131,6 +131,53 @@
STOU %1,%0 STOU %1,%0
%r0%I1") %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" (define_insn "adddi3"
[(set (match_operand:DI 0 "register_operand" "=r,r,r") [(set (match_operand:DI 0 "register_operand" "=r,r,r")
(plus:DI (plus:DI