summaryrefslogtreecommitdiffstats
path: root/gcc/config/s390/2064.md
diff options
context:
space:
mode:
authorhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-15 10:38:01 +0000
committerhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-15 10:38:01 +0000
commit71343e6ba26ee48db565a642cf7eba05f3349a18 (patch)
treef2de337970ff0f6f21ec8b7d4079166d85e89b3a /gcc/config/s390/2064.md
parentf2522b332a588146703d213b0540cf60e21565e0 (diff)
downloadppe42-gcc-71343e6ba26ee48db565a642cf7eba05f3349a18.tar.gz
ppe42-gcc-71343e6ba26ee48db565a642cf7eba05f3349a18.zip
* config/s390/s390.c (s390_safe_attr_type): New function.
(s390_use_dfa_pipeline_interface): New function, return true for z900. (s390_issue_rate): New function. (s390_agen_dep_p): New function. (addr_generation_dependency_p): Use 's390_safe_attr_type'. (s390_adjust_cost): Return 'cost' if new DFA is used. (s390_adjust_priority): Delete function. * config/s390/s390-protos.h: (s390_agen_dep_p): New prototype. * config/s390/s390.md (atype attribute): Attribute 'atype' default determined by 'op_type'. (type attribute): Added more type attributes. * config/s390/2064.md: New DFA description for z900 pipeline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61321 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390/2064.md')
-rw-r--r--gcc/config/s390/2064.md131
1 files changed, 131 insertions, 0 deletions
diff --git a/gcc/config/s390/2064.md b/gcc/config/s390/2064.md
new file mode 100644
index 00000000000..a4296c0a071
--- /dev/null
+++ b/gcc/config/s390/2064.md
@@ -0,0 +1,131 @@
+;; Scheduling description for z900 (cpu 2064).
+;; Copyright (C) 2002 Free Software Foundation, Inc.
+;; Contributed by Hartmut Penner (hpenner@de.ibm.com) and
+;; Ulrich Weigand (uweigand@de.ibm.com).
+;;
+;; This file is part of GNU CC.
+;;
+;; GNU CC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU CC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU CC; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;
+;; References:
+;; The microarchitecture of the IBM eServer z900 processor.
+;; E.M. Schwarz et al.
+;; IBM Journal of Research and Development Vol. 46 No 4/5, 2002.
+;;
+;; z900 (cpu 2064) pipeline
+;;
+;; dec
+;; --> | <---
+;; LA bypass | agen |
+;; | | |
+;; --- c1 | Load bypass
+;; | |
+;; c2----
+;; |
+;; e1
+;; |
+;; wr
+
+(define_automaton "z_ipu")
+(define_cpu_unit "z_e1" "z_ipu")
+(define_cpu_unit "z_wr" "z_ipu")
+
+
+(define_insn_reservation "z_la" 1
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "la"))
+ "z_e1,z_wr")
+
+(define_insn_reservation "z_larl" 1
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "larl"))
+ "z_e1,z_wr")
+
+(define_insn_reservation "z_load" 1
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "load"))
+ "z_e1,z_wr")
+
+(define_insn_reservation "z_store" 1
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "store"))
+ "z_e1,z_wr")
+
+(define_insn_reservation "z_call" 5
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "jsr"))
+ "z_e1*5,z_wr")
+
+(define_insn_reservation "z_o2" 2
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "o2"))
+ "z_e1*2,z_wr")
+
+(define_insn_reservation "z_o3" 3
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "type" "o3"))
+ "z_e1*3,z_wr")
+
+;
+; Insn still not mentioned are check for
+; the usage of the agen unit
+;
+
+(define_insn_reservation "z_int" 1
+ (and (eq_attr "cpu" "z900")
+ (eq_attr "atype" "reg"))
+ "z_e1,z_wr")
+
+(define_insn_reservation "z_agen" 1
+ (and (eq_attr "cpu" "z900")
+ (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 dependend insn to form a address.
+;;
+
+;;
+;; If a intruction uses a register to address memory, it needs
+;; to be set 5 cycles in advance.
+;;
+
+(define_bypass 5 "z_int,z_agen"
+ "z_agen,z_la,z_call,z_load,z_store" "s390_agen_dep_p")
+
+;;
+;; A load type instruction uses a bypass to feed the result back
+;; to the address generation pipeline stage.
+;;
+
+(define_bypass 2 "z_load"
+ "z_agen,z_la,z_call,z_load,z_store" "s390_agen_dep_p")
+
+;;
+;; A load address type instruction uses a bypass to feed the
+;; result back to the address generation pipeline stage.
+;;
+
+(define_bypass 1 "z_larl,z_la"
+ "z_agen,z_la,z_call,z_load,z_store" "s390_agen_dep_p")
+
+
+
+
+
OpenPOWER on IntegriCloud