From 2b18b49bb8b3a4604aa4bbf835a82622a3cc2029 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Thu, 6 Mar 2003 05:01:15 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 +++++ gcc/config/mmix/mmix.md | 49 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bcb228769df..fa602d4f28b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-03-06 Hans-Peter Nilsson + + * config/mmix/mmix.md ("*movcc_expanded"): New pattern. + ("movcc", "movcc_uns", "movcc_fp", "movcc_fpeq", "movcc_fun"): New + expanders. + 2003-03-05 Roger Sayle * expr.h (lang_expand_expr): Delete obsolete prototype. diff --git a/gcc/config/mmix/mmix.md b/gcc/config/mmix/mmix.md index dc7148f39d3b..e3623bdaed05 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 +;; 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 -- 2.43.5