1 ;; ARM VFP11 pipeline description
2 ;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
3 ;; Written by CodeSourcery.
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify it
8 ;; under the terms of the GNU General Public License as published
9 ;; by the Free Software Foundation; either version 3, or (at your
10 ;; option) any later version.
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
13 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 ;; License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>.
21 (define_automaton "vfp11")
23 ;; There are 3 pipelines in the VFP11 unit.
25 ;; - A 8-stage FMAC pipeline (7 execute + writeback) with forward from
26 ;; fourth stage for simple operations.
28 ;; - A 5-stage DS pipeline (4 execute + writeback) for divide/sqrt insns.
29 ;; These insns also uses first execute stage of FMAC pipeline.
31 ;; - A 4-stage LS pipeline (execute + 2 memory + writeback) with forward from
32 ;; second memory stage for loads.
34 ;; We do not model Write-After-Read hazards.
35 ;; We do not do write scheduling with the arm core, so it is only necessary
36 ;; to model the first stage of each pipeline
37 ;; ??? Need to model LS pipeline properly for load/store multiple?
38 ;; We do not model fmstat properly. This could be done by modeling pipelines
39 ;; properly and defining an absence set between a dummy fmstat unit and all
42 (define_cpu_unit "fmac" "vfp11")
44 (define_cpu_unit "ds" "vfp11")
46 (define_cpu_unit "vfp_ls" "vfp11")
48 (define_cpu_unit "fmstat" "vfp11")
50 (exclusion_set "fmac,ds" "fmstat")
52 (define_insn_reservation "vfp_ffarith" 4
53 (and (eq_attr "generic_vfp" "yes")
54 (eq_attr "type" "fcpys,ffariths,ffarithd,fcmps,fcmpd"))
57 (define_insn_reservation "vfp_farith" 8
58 (and (eq_attr "generic_vfp" "yes")
59 (eq_attr "type" "fadds,faddd,fconsts,fconstd,f_cvt,fmuls,fmacs,ffmas"))
62 (define_insn_reservation "vfp_fmul" 9
63 (and (eq_attr "generic_vfp" "yes")
64 (eq_attr "type" "fmuld,fmacd,ffmad"))
67 (define_insn_reservation "vfp_fdivs" 19
68 (and (eq_attr "generic_vfp" "yes")
69 (eq_attr "type" "fdivs"))
72 (define_insn_reservation "vfp_fdivd" 33
73 (and (eq_attr "generic_vfp" "yes")
74 (eq_attr "type" "fdivd"))
77 ;; Moves to/from arm regs also use the load/store pipeline.
78 (define_insn_reservation "vfp_fload" 4
79 (and (eq_attr "generic_vfp" "yes")
80 (eq_attr "type" "f_loads,f_loadd,r_2_f"))
83 (define_insn_reservation "vfp_fstore" 4
84 (and (eq_attr "generic_vfp" "yes")
85 (eq_attr "type" "f_stores,f_stored,f_2_r"))
88 (define_insn_reservation "vfp_to_cpsr" 4
89 (and (eq_attr "generic_vfp" "yes")
90 (eq_attr "type" "f_flag"))