1 ;; Scheduling description for LEON.
2 ;; Copyright (C) 2010-2014 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 3, 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 COPYING3. If not see
18 ;; <http://www.gnu.org/licenses/>.
20 ;; Leon is a single-issue processor.
22 (define_automaton "leon")
24 (define_cpu_unit "leon_memory" "leon")
26 (define_insn_reservation "leon_load" 1
27 (and (eq_attr "cpu" "leon") (eq_attr "type" "load,sload"))
30 ;; Use a double reservation to work around the load pipeline hazard on UT699.
31 (define_insn_reservation "leon3_load" 1
32 (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
35 (define_insn_reservation "leon_store" 2
36 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
39 ;; This describes Gaisler Research's FPU
41 (define_automaton "grfpu")
43 (define_cpu_unit "grfpu_alu" "grfpu")
44 (define_cpu_unit "grfpu_ds" "grfpu")
46 (define_insn_reservation "leon_fp_alu" 4
47 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
48 "grfpu_alu, nothing*3")
50 (define_insn_reservation "leon_fp_divs" 16
51 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
52 "grfpu_ds*14, nothing*2")
54 (define_insn_reservation "leon_fp_divd" 17
55 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
56 "grfpu_ds*15, nothing*2")
58 (define_insn_reservation "leon_fp_sqrts" 24
59 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
60 "grfpu_ds*22, nothing*2")
62 (define_insn_reservation "leon_fp_sqrtd" 25
63 (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
64 "grfpu_ds*23, nothing*2")