1 ;; Scheduling description for IBM PowerPC 476 processor.
2 ;; Copyright (C) 2009, 2012
3 ;; Free Software Foundation, Inc.
4 ;; Contributed by Peter Bergner (bergner@vnet.ibm.com).
6 ;; This file is part of GCC.
8 ;; GCC is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 3, or (at your option)
13 ;; GCC is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GCC; see the file COPYING3. If not see
20 ;; <http://www.gnu.org/licenses/>.
22 ;; PPC476 Embedded PowerPC controller
23 ;; 3 issue (476) / 4 issue (476fp)
25 ;; i_pipe - complex integer / compare
26 ;; lj_pipe - load-store / simple integer arithmetic
27 ;; b_pipe - branch pipe
28 ;; f_pipe - floating point arithmetic
30 (define_automaton "ppc476_core,ppc476_apu")
32 (define_cpu_unit "ppc476_i_pipe,ppc476_lj_pipe,ppc476_b_pipe" "ppc476_core")
33 (define_cpu_unit "ppc476_issue_fp,ppc476_f_pipe" "ppc476_apu")
34 (define_cpu_unit "ppc476_issue_0,ppc476_issue_1,ppc476_issue_2" "ppc476_core")
36 (define_reservation "ppc476_issue" "ppc476_issue_0|ppc476_issue_1|ppc476_issue_2")
37 (define_reservation "ppc476_issue2" "ppc476_issue_0+ppc476_issue_1\
38 |ppc476_issue_0+ppc476_issue_2\
39 |ppc476_issue_1+ppc476_issue_2")
40 (define_reservation "ppc476_issue3" "ppc476_issue_0+ppc476_issue_1+ppc476_issue_2")
42 (define_insn_reservation "ppc476-load" 4
43 (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\
45 (eq_attr "cpu" "ppc476"))
49 (define_insn_reservation "ppc476-store" 4
50 (and (eq_attr "type" "store,store_ux,store_u")
51 (eq_attr "cpu" "ppc476"))
55 (define_insn_reservation "ppc476-fpload" 4
56 (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
57 (eq_attr "cpu" "ppc476"))
61 (define_insn_reservation "ppc476-fpstore" 4
62 (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
63 (eq_attr "cpu" "ppc476"))
67 (define_insn_reservation "ppc476-simple-integer" 1
68 (and (eq_attr "type" "integer,insert_word,var_shift_rotate,exts,shift")
69 (eq_attr "cpu" "ppc476"))
71 ppc476_i_pipe|ppc476_lj_pipe")
73 (define_insn_reservation "ppc476-complex-integer" 1
74 (and (eq_attr "type" "cmp,cr_logical,delayed_cr,cntlz,isel,isync,sync,trap,popcnt")
75 (eq_attr "cpu" "ppc476"))
79 (define_insn_reservation "ppc476-compare" 4
80 (and (eq_attr "type" "compare,delayed_compare,fast_compare,mfcr,mfcrf,\
81 mtcr,mfjmpr,mtjmpr,var_delayed_compare")
82 (eq_attr "cpu" "ppc476"))
86 (define_insn_reservation "ppc476-imul" 4
87 (and (eq_attr "type" "imul,imul_compare,imul2,imul3")
88 (eq_attr "cpu" "ppc476"))
92 (define_insn_reservation "ppc476-idiv" 11
93 (and (eq_attr "type" "idiv")
94 (eq_attr "cpu" "ppc476"))
98 (define_insn_reservation "ppc476-branch" 1
99 (and (eq_attr "type" "branch,jmpreg")
100 (eq_attr "cpu" "ppc476"))
104 (define_insn_reservation "ppc476-two" 2
105 (and (eq_attr "type" "two")
106 (eq_attr "cpu" "ppc476"))
108 ppc476_i_pipe|ppc476_lj_pipe,\
109 ppc476_i_pipe|ppc476_lj_pipe")
111 (define_insn_reservation "ppc476-three" 3
112 (and (eq_attr "type" "three")
113 (eq_attr "cpu" "ppc476"))
115 ppc476_i_pipe|ppc476_lj_pipe,\
116 ppc476_i_pipe|ppc476_lj_pipe,\
117 ppc476_i_pipe|ppc476_lj_pipe")
119 (define_insn_reservation "ppc476-fpcompare" 6
120 (and (eq_attr "type" "fpcompare")
121 (eq_attr "cpu" "ppc476"))
122 "ppc476_issue+ppc476_issue_fp,\
123 ppc476_f_pipe+ppc476_i_pipe")
125 (define_insn_reservation "ppc476-fp" 6
126 (and (eq_attr "type" "fp,dmul")
127 (eq_attr "cpu" "ppc476"))
131 (define_insn_reservation "ppc476-sdiv" 19
132 (and (eq_attr "type" "sdiv")
133 (eq_attr "cpu" "ppc476"))
137 (define_insn_reservation "ppc476-ddiv" 33
138 (and (eq_attr "type" "ddiv")
139 (eq_attr "cpu" "ppc476"))