1 ;; Scheduling description for IBM PowerPC 403 and PowerPC 405 processors.
2 ;; Copyright (C) 2003-2013 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 "ppc40x,ppc40xiu")
21 (define_cpu_unit "bpu_40x,fpu_405" "ppc40x")
22 (define_cpu_unit "iu_40x" "ppc40xiu")
24 ;; PPC401 / PPC403 / PPC405 32-bit integer only IU BPU
25 ;; Embedded PowerPC controller
27 ;; Max issue two insns/cycle (includes one branch)
28 (define_insn_reservation "ppc403-load" 2
29 (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,\
31 (eq_attr "cpu" "ppc403,ppc405"))
34 (define_insn_reservation "ppc403-store" 2
35 (and (eq_attr "type" "store,store_ux,store_u")
36 (eq_attr "cpu" "ppc403,ppc405"))
39 (define_insn_reservation "ppc403-integer" 1
40 (and (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\
41 var_shift_rotate,cntlz,exts,isel")
42 (eq_attr "cpu" "ppc403,ppc405"))
45 (define_insn_reservation "ppc403-two" 1
46 (and (eq_attr "type" "two")
47 (eq_attr "cpu" "ppc403,ppc405"))
50 (define_insn_reservation "ppc403-three" 1
51 (and (eq_attr "type" "three")
52 (eq_attr "cpu" "ppc403,ppc405"))
53 "iu_40x,iu_40x,iu_40x")
55 (define_insn_reservation "ppc403-compare" 3
56 (and (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\
58 (eq_attr "cpu" "ppc403,ppc405"))
59 "iu_40x,nothing,bpu_40x")
61 (define_insn_reservation "ppc403-imul" 4
62 (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
63 (eq_attr "cpu" "ppc403"))
66 (define_insn_reservation "ppc405-imul" 5
67 (and (eq_attr "type" "imul,imul_compare")
68 (eq_attr "cpu" "ppc405"))
71 (define_insn_reservation "ppc405-imul2" 3
72 (and (eq_attr "type" "imul2")
73 (eq_attr "cpu" "ppc405"))
76 (define_insn_reservation "ppc405-imul3" 2
77 (and (eq_attr "type" "imul3")
78 (eq_attr "cpu" "ppc405"))
81 (define_insn_reservation "ppc403-idiv" 33
82 (and (eq_attr "type" "idiv")
83 (eq_attr "cpu" "ppc403,ppc405"))
86 (define_insn_reservation "ppc403-mfcr" 2
87 (and (eq_attr "type" "mfcr")
88 (eq_attr "cpu" "ppc403,ppc405"))
91 (define_insn_reservation "ppc403-mtcr" 3
92 (and (eq_attr "type" "mtcr")
93 (eq_attr "cpu" "ppc403,ppc405"))
96 (define_insn_reservation "ppc403-mtjmpr" 4
97 (and (eq_attr "type" "mtjmpr")
98 (eq_attr "cpu" "ppc403,ppc405"))
101 (define_insn_reservation "ppc403-mfjmpr" 2
102 (and (eq_attr "type" "mfjmpr")
103 (eq_attr "cpu" "ppc403,ppc405"))
106 (define_insn_reservation "ppc403-jmpreg" 1
107 (and (eq_attr "type" "jmpreg,branch,isync")
108 (eq_attr "cpu" "ppc403,ppc405"))
111 (define_insn_reservation "ppc403-cr" 2
112 (and (eq_attr "type" "cr_logical,delayed_cr")
113 (eq_attr "cpu" "ppc403,ppc405"))
116 (define_insn_reservation "ppc405-float" 11
117 (and (eq_attr "type" "fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,\
118 fpcompare,fp,dmul,sdiv,ddiv")
119 (eq_attr "cpu" "ppc405"))