Commit 29a74354 by Ulrich Weigand Committed by Ulrich Weigand

2064.md ("z_int", "z_agen"): Ensure the condition matches no insns already…

2064.md ("z_int", "z_agen"): Ensure the condition matches no insns already matched by other reservations.

	* 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".

From-SVN: r90190
parent a8f48325
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> 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
* fold-const.c (non_lvalue): Don't construct NON_LVALUE_EXPR * fold-const.c (non_lvalue): Don't construct NON_LVALUE_EXPR
......
...@@ -72,22 +72,20 @@ ...@@ -72,22 +72,20 @@
(eq_attr "type" "jsr")) (eq_attr "type" "jsr"))
"z_e1*5,z_wr") "z_e1*5,z_wr")
; ;; For everything else we check the atype flag.
; Insn still not mentioned are check for
; the usage of the agen unit
;
(define_insn_reservation "z_int" 1 (define_insn_reservation "z_int" 1
(and (eq_attr "cpu" "z900,g5,g6") (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") "z_e1,z_wr")
(define_insn_reservation "z_agen" 1 (define_insn_reservation "z_agen" 1
(and (eq_attr "cpu" "z900,g5,g6") (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") "z_e1,z_wr")
;; ;;
;; s390_agen_dep_p returns 1, if a register is set in the ;; 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. ;; first insn and used in the dependent insn to form a address.
......
...@@ -61,6 +61,18 @@ ...@@ -61,6 +61,18 @@
;; Simple insns ;; 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 (define_insn_reservation "x_lr" 1
(and (eq_attr "cpu" "z990") (and (eq_attr "cpu" "z990")
(eq_attr "type" "lr")) (eq_attr "type" "lr"))
...@@ -100,11 +112,16 @@ ...@@ -100,11 +112,16 @@
;; Multicycle insns ;; Multicycle insns
;; ;;
(define_insn_reservation "x_ss" 1 (define_insn_reservation "x_cs" 1
(and (eq_attr "cpu" "z990") (and (eq_attr "cpu" "z990")
(eq_attr "op_type" "SS")) (eq_attr "type" "cs"))
"x-e1-np,x-wr-np") "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 (define_insn_reservation "x_stm" 1
(and (eq_attr "cpu" "z990") (and (eq_attr "cpu" "z990")
(eq_attr "type" "stm")) (eq_attr "type" "stm"))
...@@ -115,9 +132,9 @@ ...@@ -115,9 +132,9 @@
(eq_attr "type" "lm")) (eq_attr "type" "lm"))
"x-e1-np*10,x-wr-np") "x-e1-np*10,x-wr-np")
(define_insn_reservation "x_nn" 1 (define_insn_reservation "x_other" 1
(and (eq_attr "cpu" "z990") (and (eq_attr "cpu" "z990")
(eq_attr "op_type" "NN")) (eq_attr "type" "other"))
"x-e1-np,x-wr-np") "x-e1-np,x-wr-np")
;; ;;
...@@ -183,21 +200,6 @@ ...@@ -183,21 +200,6 @@
(define_bypass 1 "x_floads" "x_fsimps,x_fstores,x_floads") (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 ;; 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. ;; first insn and used in the dependent insn to form a address.
;; ;;
...@@ -208,7 +210,7 @@ ...@@ -208,7 +210,7 @@
;; ;;
(define_bypass 5 "x_int,x_agen,x_lr" (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") "s390_agen_dep_p")
(define_bypass 9 "x_int,x_agen,x_lr" (define_bypass 9 "x_int,x_agen,x_lr"
...@@ -221,7 +223,7 @@ ...@@ -221,7 +223,7 @@
;; ;;
(define_bypass 4 "x_load" (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") "s390_agen_dep_p")
(define_bypass 5 "x_load" (define_bypass 5 "x_load"
...@@ -235,7 +237,7 @@ ...@@ -235,7 +237,7 @@
;; ;;
(define_bypass 3 "x_larl,x_la" (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") "s390_agen_dep_p")
(define_bypass 5 "x_larl, x_la" (define_bypass 5 "x_larl, x_la"
......
...@@ -143,16 +143,14 @@ ...@@ -143,16 +143,14 @@
]) ])
;; Processor type. This attribute must exactly match the processor_type ;; Instruction operand type as used in the Principles of Operation.
;; enumeration in s390.h. The current machine description does not ;; Used to determine defaults for length and other attribute values.
;; 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" (define_attr "op_type"
(const (symbol_ref "s390_tune"))) "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 ;; Instruction type attribute used for scheduling.
;; computations.
(define_attr "type" "none,integer,load,lr,la,larl,lm,stm, (define_attr "type" "none,integer,load,lr,la,larl,lm,stm,
cs,vs,store,imul,idiv, cs,vs,store,imul,idiv,
...@@ -161,17 +159,13 @@ ...@@ -161,17 +159,13 @@
fmuld,fmuls,fdivd,fdivs, fmuld,fmuls,fdivd,fdivs,
ftoi,itof,fsqrtd,fsqrts, ftoi,itof,fsqrtd,fsqrts,
other" 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 ;; Another attribute used for scheduling purposes:
;; agen: Instruction uses the address generation unit
(define_attr "op_type" ;; reg: Instruction does not use the agen unit
"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
(define_attr "atype" "agen,reg" (define_attr "atype" "agen,reg"
(cond [ (eq_attr "op_type" "E") (const_string "reg") (cond [ (eq_attr "op_type" "E") (const_string "reg")
...@@ -193,13 +187,6 @@ ...@@ -193,13 +187,6 @@
(eq_attr "op_type" "SIY") (const_string "agen")] (eq_attr "op_type" "SIY") (const_string "agen")]
(const_string "reg"))) (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. ;; Length in bytes.
(define_attr "length" "" (define_attr "length" ""
...@@ -227,6 +214,23 @@ ...@@ -227,6 +214,23 @@
(define_asm_attributes [(set_attr "type" "other") (define_asm_attributes [(set_attr "type" "other")
(set_attr "op_type" "NN")]) (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 ;; Condition Codes
;; ;;
...@@ -1760,7 +1764,8 @@ ...@@ -1760,7 +1764,8 @@
"GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT "GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
&& GET_MODE_SIZE (GET_MODE (operands[1])) <= UNITS_PER_WORD" && GET_MODE_SIZE (GET_MODE (operands[1])) <= UNITS_PER_WORD"
"ex\t%1,%2" "ex\t%1,%2"
[(set_attr "op_type" "RX")]) [(set_attr "op_type" "RX")
(set_attr "type" "cs")])
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment