1 ;; Scheduling description for PowerPC 601 processor.
2 ;; Copyright (C) 2003-2014 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify it
7 ;; under the terms of the GNU General Public License as published
8 ;; by the Free Software Foundation; either version 3, or (at your
9 ;; option) any later version.
11 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
12 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 ;; License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING3. If not see
18 ;; <http://www.gnu.org/licenses/>.
20 (define_automaton "ppc601,ppc601fp")
21 (define_cpu_unit "iu_ppc601" "ppc601")
22 (define_cpu_unit "fpu_ppc601" "ppc601fp")
23 (define_cpu_unit "bpu_ppc601" "ppc601")
25 ;; PPC601 32-bit IU, FPU, BPU
27 (define_insn_reservation "ppc601-load" 2
28 (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\
30 (eq_attr "cpu" "ppc601"))
33 (define_insn_reservation "ppc601-store" 2
34 (and (eq_attr "type" "store,store_ux,store_u")
35 (eq_attr "cpu" "ppc601"))
38 (define_insn_reservation "ppc601-fpload" 3
39 (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
40 (eq_attr "cpu" "ppc601"))
43 (define_insn_reservation "ppc601-fpstore" 3
44 (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
45 (eq_attr "cpu" "ppc601"))
46 "iu_ppc601+fpu_ppc601")
48 (define_insn_reservation "ppc601-integer" 1
49 (and (eq_attr "type" "integer,insert_word,insert_dword,shift,\
50 trap,var_shift_rotate,cntlz,exts,isel")
51 (eq_attr "cpu" "ppc601"))
54 (define_insn_reservation "ppc601-two" 1
55 (and (eq_attr "type" "two")
56 (eq_attr "cpu" "ppc601"))
57 "iu_ppc601,iu_ppc601")
59 (define_insn_reservation "ppc601-three" 1
60 (and (eq_attr "type" "three")
61 (eq_attr "cpu" "ppc601"))
62 "iu_ppc601,iu_ppc601,iu_ppc601")
64 (define_insn_reservation "ppc601-imul" 5
65 (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
66 (eq_attr "cpu" "ppc601"))
69 (define_insn_reservation "ppc601-idiv" 36
70 (and (eq_attr "type" "idiv")
71 (eq_attr "cpu" "ppc601"))
74 ; compare executes on integer unit, but feeds insns which
75 ; execute on the branch unit.
76 (define_insn_reservation "ppc601-compare" 3
77 (and (eq_attr "type" "cmp,compare,delayed_compare,\
79 (eq_attr "cpu" "ppc601"))
80 "iu_ppc601,nothing,bpu_ppc601")
82 (define_insn_reservation "ppc601-fpcompare" 5
83 (and (eq_attr "type" "fpcompare")
84 (eq_attr "cpu" "ppc601"))
85 "(fpu_ppc601+iu_ppc601*2),nothing*2,bpu_ppc601")
87 (define_insn_reservation "ppc601-fp" 4
88 (and (eq_attr "type" "fp")
89 (eq_attr "cpu" "ppc601"))
92 (define_insn_reservation "ppc601-dmul" 5
93 (and (eq_attr "type" "dmul")
94 (eq_attr "cpu" "ppc601"))
97 (define_insn_reservation "ppc601-sdiv" 17
98 (and (eq_attr "type" "sdiv")
99 (eq_attr "cpu" "ppc601"))
102 (define_insn_reservation "ppc601-ddiv" 31
103 (and (eq_attr "type" "ddiv")
104 (eq_attr "cpu" "ppc601"))
107 (define_insn_reservation "ppc601-mfcr" 2
108 (and (eq_attr "type" "mfcr")
109 (eq_attr "cpu" "ppc601"))
110 "iu_ppc601,bpu_ppc601")
112 (define_insn_reservation "ppc601-mtcr" 4
113 (and (eq_attr "type" "mtcr")
114 (eq_attr "cpu" "ppc601"))
115 "iu_ppc601,bpu_ppc601")
117 (define_insn_reservation "ppc601-crlogical" 4
118 (and (eq_attr "type" "cr_logical,delayed_cr")
119 (eq_attr "cpu" "ppc601"))
122 (define_insn_reservation "ppc601-mtjmpr" 4
123 (and (eq_attr "type" "mtjmpr")
124 (eq_attr "cpu" "ppc601"))
125 "iu_ppc601,bpu_ppc601")
127 (define_insn_reservation "ppc601-mfjmpr" 2
128 (and (eq_attr "type" "mfjmpr")
129 (eq_attr "cpu" "ppc601"))
130 "iu_ppc601,bpu_ppc601")
132 (define_insn_reservation "ppc601-branch" 1
133 (and (eq_attr "type" "jmpreg,branch,isync")
134 (eq_attr "cpu" "ppc601"))