summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-06 19:57:41 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-06 19:57:41 +0000
commitcec0d54df84b3d2d9bdbdb46e86af53b98ce3d13 (patch)
tree4f831f5fa5c96b2383994ecb79b41ccb31af2dbf
parent2e3f2a1d271608d12267d7f3198b474e5d2acc7c (diff)
downloadgcc-cec0d54df84b3d2d9bdbdb46e86af53b98ce3d13.tar.gz
* config/s390/2064.md ("z_int", "z_agen"): Ensure the condition
matches no insns already matched by other reservations. * config/s390/2084.md ("x_int", "x_agen"): Ensure the condition matches no insns already matched by other reservations. ("x_ss"): Remove, replace by ... ("x_cs"): ... this new reservation. Check type instead of op_type. Update bypasses to use x_cs instead of x_ss. ("x_nn"): Remove, replace by ... ("x_other"): ... this new reservation. Check type instead of op_type. Add x_other and x_branch to bypasses. ("x_vs"): New reservation. * config/s390/s390.md (attribute "type"): Default according to op_type. ("*execute"): Set type to "cs". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90190 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog16
-rw-r--r--gcc/config/s390/2064.md12
-rw-r--r--gcc/config/s390/2084.md46
-rw-r--r--gcc/config/s390/s390.md57
4 files changed, 76 insertions, 55 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76bab59a888..c9f797b9d9e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,19 @@
+2004-11-06 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/2064.md ("z_int", "z_agen"): Ensure the condition
+ matches no insns already matched by other reservations.
+ * config/s390/2084.md ("x_int", "x_agen"): Ensure the condition
+ matches no insns already matched by other reservations.
+ ("x_ss"): Remove, replace by ...
+ ("x_cs"): ... this new reservation. Check type instead of op_type.
+ Update bypasses to use x_cs instead of x_ss.
+ ("x_nn"): Remove, replace by ...
+ ("x_other"): ... this new reservation. Check type instead of op_type.
+ Add x_other and x_branch to bypasses.
+ ("x_vs"): New reservation.
+ * config/s390/s390.md (attribute "type"): Default according to op_type.
+ ("*execute"): Set type to "cs".
+
2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
* fold-const.c (non_lvalue): Don't construct NON_LVALUE_EXPR
diff --git a/gcc/config/s390/2064.md b/gcc/config/s390/2064.md
index 643277e889b..211cd024d01 100644
--- a/gcc/config/s390/2064.md
+++ b/gcc/config/s390/2064.md
@@ -72,22 +72,20 @@
(eq_attr "type" "jsr"))
"z_e1*5,z_wr")
-;
-; Insn still not mentioned are check for
-; the usage of the agen unit
-;
+;; For everything else we check the atype flag.
(define_insn_reservation "z_int" 1
(and (eq_attr "cpu" "z900,g5,g6")
- (eq_attr "atype" "reg"))
+ (and (not (eq_attr "type" "la,larl,load,store,jsr"))
+ (eq_attr "atype" "reg")))
"z_e1,z_wr")
(define_insn_reservation "z_agen" 1
(and (eq_attr "cpu" "z900,g5,g6")
- (eq_attr "atype" "agen"))
+ (and (not (eq_attr "type" "la,larl,load,store,jsr"))
+ (eq_attr "atype" "agen")))
"z_e1,z_wr")
-
;;
;; s390_agen_dep_p returns 1, if a register is set in the
;; first insn and used in the dependent insn to form a address.
diff --git a/gcc/config/s390/2084.md b/gcc/config/s390/2084.md
index cff4420f29a..c07f4cf9ffd 100644
--- a/gcc/config/s390/2084.md
+++ b/gcc/config/s390/2084.md
@@ -61,6 +61,18 @@
;; Simple insns
;;
+(define_insn_reservation "x_int" 1
+ (and (eq_attr "cpu" "z990")
+ (and (eq_attr "type" "integer")
+ (eq_attr "atype" "reg")))
+ "x-e1-st,x-wr-st")
+
+(define_insn_reservation "x_agen" 1
+ (and (eq_attr "cpu" "z990")
+ (and (eq_attr "type" "integer")
+ (eq_attr "atype" "agen")))
+ "x-e1-st,x-wr-st")
+
(define_insn_reservation "x_lr" 1
(and (eq_attr "cpu" "z990")
(eq_attr "type" "lr"))
@@ -100,11 +112,16 @@
;; Multicycle insns
;;
-(define_insn_reservation "x_ss" 1
+(define_insn_reservation "x_cs" 1
(and (eq_attr "cpu" "z990")
- (eq_attr "op_type" "SS"))
+ (eq_attr "type" "cs"))
"x-e1-np,x-wr-np")
+(define_insn_reservation "x_vs" 1
+ (and (eq_attr "cpu" "z990")
+ (eq_attr "type" "vs"))
+ "x-e1-np*10,x-wr-np")
+
(define_insn_reservation "x_stm" 1
(and (eq_attr "cpu" "z990")
(eq_attr "type" "stm"))
@@ -115,9 +132,9 @@
(eq_attr "type" "lm"))
"x-e1-np*10,x-wr-np")
-(define_insn_reservation "x_nn" 1
+(define_insn_reservation "x_other" 1
(and (eq_attr "cpu" "z990")
- (eq_attr "op_type" "NN"))
+ (eq_attr "type" "other"))
"x-e1-np,x-wr-np")
;;
@@ -183,21 +200,6 @@
(define_bypass 1 "x_floads" "x_fsimps,x_fstores,x_floads")
;;
-;; Insns still not mentioned are checked for
-;; the usage of the agen unit
-;;
-
-(define_insn_reservation "x_int" 1
- (and (eq_attr "cpu" "z990")
- (eq_attr "atype" "reg"))
- "x-e1-st,x-wr-st")
-
-(define_insn_reservation "x_agen" 1
- (and (eq_attr "cpu" "z990")
- (eq_attr "atype" "agen"))
- "x-e1-st+x-mem,x-wr-st")
-
-;;
;; s390_agen_dep_p returns 1, if a register is set in the
;; first insn and used in the dependent insn to form a address.
;;
@@ -208,7 +210,7 @@
;;
(define_bypass 5 "x_int,x_agen,x_lr"
- "x_agen,x_la,x_call,x_load,x_store,x_ss,x_stm,x_lm"
+ "x_agen,x_la,x_branch,x_call,x_load,x_store,x_cs,x_stm,x_lm,x_other"
"s390_agen_dep_p")
(define_bypass 9 "x_int,x_agen,x_lr"
@@ -221,7 +223,7 @@
;;
(define_bypass 4 "x_load"
- "x_agen,x_la,x_call,x_load,x_store,x_ss,x_stm,x_lm"
+ "x_agen,x_la,x_branch,x_call,x_load,x_store,x_cs,x_stm,x_lm,x_other"
"s390_agen_dep_p")
(define_bypass 5 "x_load"
@@ -235,7 +237,7 @@
;;
(define_bypass 3 "x_larl,x_la"
- "x_agen,x_la,x_call,x_load,x_store,x_ss,x_stm,x_lm"
+ "x_agen,x_la,x_branch,x_call,x_load,x_store,x_cs,x_stm,x_lm,x_other"
"s390_agen_dep_p")
(define_bypass 5 "x_larl, x_la"
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index f763294cf73..ed19615514b 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -143,16 +143,14 @@
])
-;; Processor type. This attribute must exactly match the processor_type
-;; enumeration in s390.h. The current machine description does not
-;; distinguish between g5 and g6, but there are differences between the two
-;; CPUs could in theory be modeled.
+;; Instruction operand type as used in the Principles of Operation.
+;; Used to determine defaults for length and other attribute values.
-(define_attr "cpu" "g5,g6,z900,z990"
- (const (symbol_ref "s390_tune")))
+(define_attr "op_type"
+ "NN,E,RR,RRE,RX,RS,RSI,RI,SI,S,SS,SSE,RXE,RSE,RIL,RIE,RXY,RSY,SIY"
+ (const_string "RX"))
-;; Define an insn type attribute. This is used in function unit delay
-;; computations.
+;; Instruction type attribute used for scheduling.
(define_attr "type" "none,integer,load,lr,la,larl,lm,stm,
cs,vs,store,imul,idiv,
@@ -161,17 +159,13 @@
fmuld,fmuls,fdivd,fdivs,
ftoi,itof,fsqrtd,fsqrts,
other"
- (const_string "integer"))
+ (cond [(eq_attr "op_type" "NN") (const_string "other")
+ (eq_attr "op_type" "SS") (const_string "cs")]
+ (const_string "integer")))
-;; Operand type. Used to default length attribute values
-
-(define_attr "op_type"
- "NN,E,RR,RRE,RX,RS,RSI,RI,SI,S,SS,SSE,RXE,RSE,RIL,RIE,RXY,RSY,SIY"
- (const_string "RX"))
-
-;; Insn are devide in two classes:
-;; agen: Insn using agen
-;; reg: Insn not using agen
+;; Another attribute used for scheduling purposes:
+;; agen: Instruction uses the address generation unit
+;; reg: Instruction does not use the agen unit
(define_attr "atype" "agen,reg"
(cond [ (eq_attr "op_type" "E") (const_string "reg")
@@ -193,13 +187,6 @@
(eq_attr "op_type" "SIY") (const_string "agen")]
(const_string "reg")))
-;; Pipeline description for z900. For lack of anything better,
-;; this description is also used for the g5 and g6.
-(include "2064.md")
-
-;; Pipeline description for z990.
-(include "2084.md")
-
;; Length in bytes.
(define_attr "length" ""
@@ -227,6 +214,23 @@
(define_asm_attributes [(set_attr "type" "other")
(set_attr "op_type" "NN")])
+
+;; Processor type. This attribute must exactly match the processor_type
+;; enumeration in s390.h. The current machine description does not
+;; distinguish between g5 and g6, but there are differences between the two
+;; CPUs could in theory be modeled.
+
+(define_attr "cpu" "g5,g6,z900,z990"
+ (const (symbol_ref "s390_tune")))
+
+;; Pipeline description for z900. For lack of anything better,
+;; this description is also used for the g5 and g6.
+(include "2064.md")
+
+;; Pipeline description for z990.
+(include "2084.md")
+
+
;;
;; Condition Codes
;;
@@ -1760,7 +1764,8 @@
"GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
&& GET_MODE_SIZE (GET_MODE (operands[1])) <= UNITS_PER_WORD"
"ex\t%1,%2"
- [(set_attr "op_type" "RX")])
+ [(set_attr "op_type" "RX")
+ (set_attr "type" "cs")])
;