From 5ff4f02938690d606d7c034b33c636deb1b2b774 Mon Sep 17 00:00:00 2001 From: bernds Date: Sat, 14 Apr 2007 10:50:45 +0000 Subject: [PATCH] * config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied. * config/bfin/bfin.md (movsi_insn): Delete two unused alternatives. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123813 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/bfin/bfin.h | 10 +++++++++- gcc/config/bfin/bfin.md | 10 ++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2067138b3c9..016c62ade40 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-04-14 Bernd Schmidt + + * config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied. + * config/bfin/bfin.md (movsi_insn): Delete two unused alternatives. + 2007-04-14 Kazu Hirata * config.gcc: Recognize fido. diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index 3c7f0125e06..c600af395d6 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -684,7 +684,15 @@ enum reg_class If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be zero. */ -#define MODES_TIEABLE_P(MODE1, MODE2) ((MODE1) == (MODE2)) +#define MODES_TIEABLE_P(MODE1, MODE2) \ + ((MODE1) == (MODE2) \ + || ((GET_MODE_CLASS (MODE1) == MODE_INT \ + || GET_MODE_CLASS (MODE1) == MODE_FLOAT) \ + && (GET_MODE_CLASS (MODE2) == MODE_INT \ + || GET_MODE_CLASS (MODE2) == MODE_FLOAT) \ + && (MODE1) != BImode && (MODE2) != BImode \ + && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \ + && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)) /* `PREFERRED_RELOAD_CLASS (X, CLASS)' A C expression that places additional restrictions on the register diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index e7c41e2734b..853024cb148 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -522,22 +522,20 @@ ;; with a PLUS. We generally require fewer secondary reloads this way. (define_insn "*movsi_insn" - [(set (match_operand:SI 0 "nonimmediate_operand" "=da,x*y,*k,da,da,x,x,x,da,mr") - (match_operand:SI 1 "general_operand" "da,x*y,da,*k,xKs7,xKsh,xKuh,ix,mr,da"))] + [(set (match_operand:SI 0 "nonimmediate_operand" "=da,x*y,da,x,x,x,da,mr") + (match_operand:SI 1 "general_operand" "da,x*y,xKs7,xKsh,xKuh,ix,mr,da"))] "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM" "@ %0 = %1; %0 = %1; - %0 = %1; - %0 = %1; %0 = %1 (X); %0 = %1 (X); %0 = %1 (Z); # %0 = %1%! %0 = %1%!" - [(set_attr "type" "move,move,move,move,mvi,mvi,mvi,*,mcld,mcst") - (set_attr "length" "2,2,2,2,2,4,4,*,*,*")]) + [(set_attr "type" "move,move,mvi,mvi,mvi,*,mcld,mcst") + (set_attr "length" "2,2,2,4,4,*,*,*")]) (define_insn "*movsi_insn32" [(set (match_operand:SI 0 "register_operand" "=d,d") -- 2.11.4.GIT