1 ;; Scheduling description for IBM PowerPC 440 processor.
2 ;; Copyright (C) 2003 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 2, or (at your option)
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING. If not, write to
18 ;; the Free Software Foundation, 59 Temple Place - Suite 330,
19 ;; Boston, MA 02111-1307, USA.
21 ;; PPC440 Embedded PowerPC controller
23 ;; i_pipe - complex integer / compare / branch
24 ;; j_pipe - simple integer arithmetic
25 ;; l_pipe - load-store
26 ;; f_pipe - floating point arithmetic
28 (define_automaton "ppc440_core,ppc440_apu")
29 (define_cpu_unit "ppc440_i_pipe,ppc440_j_pipe,ppc440_l_pipe" "ppc440_core")
30 (define_cpu_unit "ppc440_f_pipe" "ppc440_apu")
31 (define_cpu_unit "ppc440_issue_0,ppc440_issue_1" "ppc440_core")
33 (define_reservation "ppc440_issue" "ppc440_issue_0|ppc440_issue_1")
36 (define_insn_reservation "ppc440-load" 3
37 (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
38 (eq_attr "cpu" "ppc440"))
39 "ppc440_issue,ppc440_l_pipe")
41 (define_insn_reservation "ppc440-store" 1
42 (and (eq_attr "type" "store,store_ux,store_u")
43 (eq_attr "cpu" "ppc440"))
44 "ppc440_issue,ppc440_l_pipe")
46 (define_insn_reservation "ppc440-fpload" 4
47 (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
48 (eq_attr "cpu" "ppc440"))
49 "ppc440_issue,ppc440_l_pipe")
51 (define_insn_reservation "ppc440-fpstore" 3
52 (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
53 (eq_attr "cpu" "ppc440"))
54 "ppc440_issue,ppc440_l_pipe")
56 (define_insn_reservation "ppc440-integer" 1
57 (and (eq_attr "type" "integer")
58 (eq_attr "cpu" "ppc440"))
59 "ppc440_issue,ppc440_i_pipe|ppc440_j_pipe")
61 (define_insn_reservation "ppc440-imul" 3
62 (and (eq_attr "type" "imul,imul_compare")
63 (eq_attr "cpu" "ppc440"))
64 "ppc440_issue,ppc440_i_pipe")
66 (define_insn_reservation "ppc440-imul2" 2
67 (and (eq_attr "type" "imul2,imul3")
68 (eq_attr "cpu" "ppc440"))
69 "ppc440_issue,ppc440_i_pipe")
71 (define_insn_reservation "ppc440-idiv" 34
72 (and (eq_attr "type" "idiv")
73 (eq_attr "cpu" "ppc440"))
74 "ppc440_issue,ppc440_i_pipe*33")
76 (define_insn_reservation "ppc440-branch" 1
77 (and (eq_attr "type" "branch,jmpreg")
78 (eq_attr "cpu" "ppc440"))
79 "ppc440_issue,ppc440_i_pipe")
81 (define_insn_reservation "ppc440-compare" 2
82 (and (eq_attr "type" "cmp,fast_compare,compare,cr_logical,delayed_cr,mfcr")
83 (eq_attr "cpu" "ppc440"))
84 "ppc440_issue,ppc440_i_pipe")
86 (define_insn_reservation "ppc440-fpcompare" 3 ; 2
87 (and (eq_attr "type" "fpcompare")
88 (eq_attr "cpu" "ppc440"))
89 "ppc440_issue,ppc440_f_pipe+ppc440_i_pipe")
91 (define_insn_reservation "ppc440-fp" 5
92 (and (eq_attr "type" "fp,dmul")
93 (eq_attr "cpu" "ppc440"))
94 "ppc440_issue,ppc440_f_pipe")
96 (define_insn_reservation "ppc440-sdiv" 19
97 (and (eq_attr "type" "sdiv")
98 (eq_attr "cpu" "ppc440"))
99 "ppc440_issue,ppc440_f_pipe*15")
101 (define_insn_reservation "ppc440-ddiv" 33
102 (and (eq_attr "type" "ddiv")
103 (eq_attr "cpu" "ppc440"))
104 "ppc440_issue,ppc440_f_pipe*29")
106 (define_insn_reservation "ppc440-mtcr" 3
107 (and (eq_attr "type" "mtcr")
108 (eq_attr "cpu" "ppc440"))
109 "ppc440_issue,ppc440_i_pipe")
111 (define_insn_reservation "ppc440-mtjmpr" 4
112 (and (eq_attr "type" "mtjmpr")
113 (eq_attr "cpu" "ppc440"))
114 "ppc440_issue,ppc440_i_pipe")
116 (define_insn_reservation "ppc440-mfjmpr" 2
117 (and (eq_attr "type" "mfjmpr")
118 (eq_attr "cpu" "ppc440"))
119 "ppc440_issue,ppc440_i_pipe")