OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [rs6000/] [603.md] - Blame information for rev 827

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
;; Scheduling description for PowerPC 603 processor.
2
;;   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
3
;;
4
;; This file is part of GCC.
5
 
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.
10
 
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.
15
 
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
;; .
19
 
20
(define_automaton "ppc603,ppc603fp")
21
(define_cpu_unit "iu_603" "ppc603")
22
(define_cpu_unit "fpu_603" "ppc603fp")
23
(define_cpu_unit "lsu_603,bpu_603,sru_603" "ppc603")
24
 
25
;; PPC603/PPC603e 32-bit IU, LSU, FPU, BPU, SRU
26
;; Max issue 3 insns/clock cycle (includes 1 branch)
27
 
28
;; Branches go straight to the BPU.  All other insns are handled
29
;; by a dispatch unit which can issue a max of 2 insns per cycle.
30
 
31
;; The PPC603e user's manual recommends that to reduce branch mispredictions,
32
;; the insn that sets CR bits should be separated from the branch insn
33
;; that evaluates them; separation by more than 9 insns ensures that the CR
34
;; bits will be immediately available for execution.
35
;; This could be artificially achieved by exaggerating the latency of
36
;; compare insns but at the expense of a poorer schedule.
37
 
38
;; CR insns get executed in the SRU.  Not modelled.
39
 
40
(define_insn_reservation "ppc603-load" 2
41
  (and (eq_attr "type" "load,load_ext,load_ux,load_u,load_l")
42
       (eq_attr "cpu" "ppc603"))
43
  "lsu_603")
44
 
45
(define_insn_reservation "ppc603-store" 2
46
  (and (eq_attr "type" "store,store_ux,store_u,fpstore,fpstore_ux,fpstore_u")
47
       (eq_attr "cpu" "ppc603"))
48
  "lsu_603*2")
49
 
50
(define_insn_reservation "ppc603-fpload" 2
51
  (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
52
       (eq_attr "cpu" "ppc603"))
53
  "lsu_603")
54
 
55
(define_insn_reservation "ppc603-storec" 8
56
  (and (eq_attr "type" "store_c")
57
       (eq_attr "cpu" "ppc603"))
58
  "lsu_603")
59
 
60
(define_insn_reservation "ppc603-integer" 1
61
  (and (eq_attr "type" "integer,insert_word")
62
       (eq_attr "cpu" "ppc603"))
63
  "iu_603")
64
 
65
(define_insn_reservation "ppc603-two" 1
66
  (and (eq_attr "type" "two")
67
       (eq_attr "cpu" "ppc603"))
68
  "iu_603,iu_603")
69
 
70
(define_insn_reservation "ppc603-three" 1
71
  (and (eq_attr "type" "three")
72
       (eq_attr "cpu" "ppc603"))
73
  "iu_603,iu_603,iu_603")
74
 
75
; This takes 2 or 3 cycles
76
(define_insn_reservation "ppc603-imul" 3
77
  (and (eq_attr "type" "imul,imul_compare")
78
       (eq_attr "cpu" "ppc603"))
79
  "iu_603*2")
80
 
81
(define_insn_reservation "ppc603-imul2" 2
82
  (and (eq_attr "type" "imul2,imul3")
83
       (eq_attr "cpu" "ppc603"))
84
  "iu_603*2")
85
 
86
(define_insn_reservation "ppc603-idiv" 37
87
  (and (eq_attr "type" "idiv")
88
       (eq_attr "cpu" "ppc603"))
89
  "iu_603*37")
90
 
91
(define_insn_reservation "ppc603-compare" 3
92
  (and (eq_attr "type" "cmp,fast_compare,compare,delayed_compare")
93
       (eq_attr "cpu" "ppc603"))
94
  "iu_603,nothing,bpu_603")
95
 
96
(define_insn_reservation "ppc603-fpcompare" 3
97
  (and (eq_attr "type" "fpcompare")
98
       (eq_attr "cpu" "ppc603"))
99
  "(fpu_603+iu_603*2),bpu_603")
100
 
101
(define_insn_reservation "ppc603-fp" 3
102
  (and (eq_attr "type" "fp")
103
       (eq_attr "cpu" "ppc603"))
104
  "fpu_603")
105
 
106
(define_insn_reservation "ppc603-dmul" 4
107
  (and (eq_attr "type" "dmul")
108
       (eq_attr "cpu" "ppc603"))
109
  "fpu_603*2")
110
 
111
; Divides are not pipelined
112
(define_insn_reservation "ppc603-sdiv" 18
113
  (and (eq_attr "type" "sdiv")
114
       (eq_attr "cpu" "ppc603"))
115
  "fpu_603*18")
116
 
117
(define_insn_reservation "ppc603-ddiv" 33
118
  (and (eq_attr "type" "ddiv")
119
       (eq_attr "cpu" "ppc603"))
120
  "fpu_603*33")
121
 
122
(define_insn_reservation "ppc603-crlogical" 2
123
  (and (eq_attr "type" "cr_logical,delayed_cr,mfcr,mtcr")
124
       (eq_attr "cpu" "ppc603"))
125
  "sru_603")
126
 
127
(define_insn_reservation "ppc603-mtjmpr" 4
128
  (and (eq_attr "type" "mtjmpr")
129
       (eq_attr "cpu" "ppc603"))
130
  "sru_603")
131
 
132
(define_insn_reservation "ppc603-mfjmpr" 2
133
  (and (eq_attr "type" "mfjmpr,isync,sync")
134
       (eq_attr "cpu" "ppc603"))
135
  "sru_603")
136
 
137
(define_insn_reservation "ppc603-jmpreg" 1
138
  (and (eq_attr "type" "jmpreg,branch")
139
       (eq_attr "cpu" "ppc603"))
140
  "bpu_603")
141
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.