From 02f6ff461aa2472703743147e98b7453a3f570ba Mon Sep 17 00:00:00 2001 From: uweigand Date: Mon, 9 May 2005 17:01:36 +0000 Subject: [PATCH] 2005-05-09 Adrian Straetling * config/s390/s390.md: ("HQI"): New mode macro. ("icm_lo", "icm_hi", "max_uint"): New mode attributes. ("*tmhi_full", "*tmqi_full"): Merge. ("*tsthiCCT", "*tstqiCCT"): Merge. ("*tsthi", "*tstqi"): Merge. ("*tsthi_cconly", "tstqi_cconly"): Merge. ("*sethighhisi", "*sethighqisi"): Merge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99449 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 10 ++++ gcc/config/s390/s390.md | 127 ++++++++++++++++++------------------------------ 2 files changed, 57 insertions(+), 80 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ceef4e4..89f2adb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2005-05-09 Adrian Straetling + + * config/s390/s390.md: ("HQI"): New mode macro. + ("icm_lo", "icm_hi", "max_uint"): New mode attributes. + ("*tmhi_full", "*tmqi_full"): Merge. + ("*tsthiCCT", "*tstqiCCT"): Merge. + ("*tsthi", "*tstqi"): Merge. + ("*tsthi_cconly", "tstqi_cconly"): Merge. + ("*sethighhisi", "*sethighqisi"): Merge. + 2005-05-09 Kazu Hirata * crtstuff.c, integrate.h, tree-scalar-evolution.h, diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 300bffb..a74cf9e 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -232,6 +232,26 @@ ;; Predicates (include "predicates.md") + +;; Macros + +;; This mode macro allows the QI and HI patterns to be defined from +;; the same template. +(define_mode_macro HQI [HI QI]) + + +;; ICM mask required to load MODE value into the highest subreg +;; of a SImode register. +(define_mode_attr icm_hi [(HI "12") (QI "8")]) + +;; ICM mask required to load MODE value into the lowest subreg +;; of a SImode register. +(define_mode_attr icm_lo [(HI "3") (QI "1")]) + +;; Maximum unsigned integer that fits in MODE. +(define_mode_attr max_uint [(HI "65535") (QI "255")]) + + ;; ;;- Compare instructions. ;; @@ -322,20 +342,12 @@ tml\t%0,%i1" [(set_attr "op_type" "RI")]) -(define_insn "*tmhi_full" - [(set (reg 33) - (compare (match_operand:HI 0 "register_operand" "d") - (match_operand:HI 1 "immediate_operand" "n")))] - "s390_match_ccmode (insn, s390_tm_ccmode (constm1_rtx, operands[1], 1))" - "tml\t%0,65535" - [(set_attr "op_type" "RI")]) - -(define_insn "*tmqi_full" +(define_insn "*tm_full" [(set (reg 33) - (compare (match_operand:QI 0 "register_operand" "d") - (match_operand:QI 1 "immediate_operand" "n")))] + (compare (match_operand:HQI 0 "register_operand" "d") + (match_operand:HQI 1 "immediate_operand" "n")))] "s390_match_ccmode (insn, s390_tm_ccmode (constm1_rtx, operands[1], 1))" - "tml\t%0,255" + "tml\t%0," [(set_attr "op_type" "RI")]) @@ -413,17 +425,17 @@ "ltr\t%0,%0" [(set_attr "op_type" "RR")]) -(define_insn "*tsthiCCT" +(define_insn "*tstCCT" [(set (reg 33) - (compare (match_operand:HI 0 "nonimmediate_operand" "?Q,?S,d") - (match_operand:HI 1 "const0_operand" ""))) - (set (match_operand:HI 2 "register_operand" "=d,d,0") + (compare (match_operand:HQI 0 "nonimmediate_operand" "?Q,?S,d") + (match_operand:HQI 1 "const0_operand" ""))) + (set (match_operand:HQI 2 "register_operand" "=d,d,0") (match_dup 0))] "s390_match_ccmode(insn, CCTmode)" "@ - icm\t%2,3,%S0 - icmy\t%2,3,%S0 - tml\t%0,65535" + icm\t%2,,%S0 + icmy\t%2,,%S0 + tml\t%0," [(set_attr "op_type" "RS,RSY,RI")]) (define_insn "*tsthiCCT_cconly" @@ -438,42 +450,6 @@ tml\t%0,65535" [(set_attr "op_type" "RS,RSY,RI")]) -(define_insn "*tsthi" - [(set (reg 33) - (compare (match_operand:HI 0 "s_operand" "Q,S") - (match_operand:HI 1 "const0_operand" ""))) - (set (match_operand:HI 2 "register_operand" "=d,d") - (match_dup 0))] - "s390_match_ccmode(insn, CCSmode)" - "@ - icm\t%2,3,%S0 - icmy\t%2,3,%S0" - [(set_attr "op_type" "RS,RSY")]) - -(define_insn "*tsthi_cconly" - [(set (reg 33) - (compare (match_operand:HI 0 "s_operand" "Q,S") - (match_operand:HI 1 "const0_operand" ""))) - (clobber (match_scratch:HI 2 "=d,d"))] - "s390_match_ccmode(insn, CCSmode)" - "@ - icm\t%2,3,%S0 - icmy\t%2,3,%S0" - [(set_attr "op_type" "RS,RSY")]) - -(define_insn "*tstqiCCT" - [(set (reg 33) - (compare (match_operand:QI 0 "nonimmediate_operand" "?Q,?S,d") - (match_operand:QI 1 "const0_operand" ""))) - (set (match_operand:QI 2 "register_operand" "=d,d,0") - (match_dup 0))] - "s390_match_ccmode(insn, CCTmode)" - "@ - icm\t%2,1,%S0 - icmy\t%2,1,%S0 - tml\t%0,255" - [(set_attr "op_type" "RS,RSY,RI")]) - (define_insn "*tstqiCCT_cconly" [(set (reg 33) (compare (match_operand:QI 0 "nonimmediate_operand" "?Q,?S,d") @@ -485,27 +461,27 @@ tml\t%0,255" [(set_attr "op_type" "SI,SIY,RI")]) -(define_insn "*tstqi" +(define_insn "*tst" [(set (reg 33) - (compare (match_operand:QI 0 "s_operand" "Q,S") - (match_operand:QI 1 "const0_operand" ""))) - (set (match_operand:QI 2 "register_operand" "=d,d") + (compare (match_operand:HQI 0 "s_operand" "Q,S") + (match_operand:HQI 1 "const0_operand" ""))) + (set (match_operand:HQI 2 "register_operand" "=d,d") (match_dup 0))] "s390_match_ccmode(insn, CCSmode)" "@ - icm\t%2,1,%S0 - icmy\t%2,1,%S0" + icm\t%2,,%S0 + icmy\t%2,,%S0" [(set_attr "op_type" "RS,RSY")]) -(define_insn "*tstqi_cconly" +(define_insn "*tst_cconly" [(set (reg 33) - (compare (match_operand:QI 0 "s_operand" "Q,S") - (match_operand:QI 1 "const0_operand" ""))) - (clobber (match_scratch:QI 2 "=d,d"))] + (compare (match_operand:HQI 0 "s_operand" "Q,S") + (match_operand:HQI 1 "const0_operand" ""))) + (clobber (match_scratch:HQI 2 "=d,d"))] "s390_match_ccmode(insn, CCSmode)" "@ - icm\t%2,1,%S0 - icmy\t%2,1,%S0" + icm\t%2,,%S0 + icmy\t%2,,%S0" [(set_attr "op_type" "RS,RSY")]) @@ -2338,24 +2314,15 @@ ;;- Conversion instructions. ;; -(define_insn "*sethighqisi" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (unspec:SI [(match_operand:QI 1 "s_operand" "Q,S")] UNSPEC_SETHIGH)) - (clobber (reg:CC 33))] - "" - "@ - icm\t%0,8,%S1 - icmy\t%0,8,%S1" - [(set_attr "op_type" "RS,RSY")]) -(define_insn "*sethighhisi" +(define_insn "*sethighsi" [(set (match_operand:SI 0 "register_operand" "=d,d") - (unspec:SI [(match_operand:HI 1 "s_operand" "Q,S")] UNSPEC_SETHIGH)) + (unspec:SI [(match_operand:HQI 1 "s_operand" "Q,S")] UNSPEC_SETHIGH)) (clobber (reg:CC 33))] "" "@ - icm\t%0,12,%S1 - icmy\t%0,12,%S1" + icm\t%0,,%S1 + icmy\t%0,,%S1" [(set_attr "op_type" "RS,RSY")]) (define_insn "*sethighqidi_64" -- 2.7.4