]>
Commit | Line | Data |
---|---|---|
07981468 | 1 | ;; Scheduling description for LEON. |
8d9254fc | 2 | ;; Copyright (C) 2010-2020 Free Software Foundation, Inc. |
07981468 KE |
3 | ;; |
4 | ;; This file is part of GCC. | |
5 | ;; | |
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 3, or (at your option) | |
9 | ;; any later version. | |
10 | ;; | |
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. | |
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 | ;; <http://www.gnu.org/licenses/>. | |
19 | ||
38ae58ca | 20 | ;; Leon is a single-issue processor. |
07981468 KE |
21 | |
22 | (define_automaton "leon") | |
23 | ||
38ae58ca | 24 | (define_cpu_unit "leon_memory" "leon") |
07981468 KE |
25 | |
26 | (define_insn_reservation "leon_load" 1 | |
ce7623ba EB |
27 | (and (eq_attr "cpu" "leon,leon3,leon3v7") |
28 | (and (eq_attr "fix_ut699" "false") (eq_attr "type" "load,sload"))) | |
07981468 KE |
29 | "leon_memory") |
30 | ||
38ae58ca | 31 | ;; Use a double reservation to work around the load pipeline hazard on UT699. |
ce7623ba EB |
32 | (define_insn_reservation "ut699_load" 1 |
33 | (and (eq_attr "cpu" "leon,leon3,leon3v7") | |
34 | (and (eq_attr "fix_ut699" "true") (eq_attr "type" "load,sload"))) | |
38ae58ca | 35 | "leon_memory*2") |
07981468 | 36 | |
38ae58ca | 37 | (define_insn_reservation "leon_store" 2 |
d81230b5 | 38 | (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store")) |
38ae58ca EB |
39 | "leon_memory*2") |
40 | ||
41 | ;; This describes Gaisler Research's FPU | |
42 | ||
43 | (define_automaton "grfpu") | |
44 | ||
45 | (define_cpu_unit "grfpu_alu" "grfpu") | |
46 | (define_cpu_unit "grfpu_ds" "grfpu") | |
47 | ||
48 | (define_insn_reservation "leon_fp_alu" 4 | |
d81230b5 | 49 | (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul")) |
38ae58ca EB |
50 | "grfpu_alu, nothing*3") |
51 | ||
52 | (define_insn_reservation "leon_fp_divs" 16 | |
d81230b5 | 53 | (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs")) |
38ae58ca EB |
54 | "grfpu_ds*14, nothing*2") |
55 | ||
56 | (define_insn_reservation "leon_fp_divd" 17 | |
d81230b5 | 57 | (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd")) |
38ae58ca EB |
58 | "grfpu_ds*15, nothing*2") |
59 | ||
60 | (define_insn_reservation "leon_fp_sqrts" 24 | |
d81230b5 | 61 | (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts")) |
38ae58ca EB |
62 | "grfpu_ds*22, nothing*2") |
63 | ||
64 | (define_insn_reservation "leon_fp_sqrtd" 25 | |
d81230b5 | 65 | (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd")) |
38ae58ca | 66 | "grfpu_ds*23, nothing*2") |