summaryrefslogtreecommitdiff
path: root/gcc/config/sparc/cypress.md
blob: 0b03e7d2fdba0221495fedd29cf27ad30a20c17c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
;; Scheduling description for SPARC Cypress.
;;   Copyright (C) 2002-2013 Free Software Foundation, Inc.
;;
;; This file is part of GCC.
;;
;; GCC is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; GCC is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GCC; see the file COPYING3.  If not see
;; <http://www.gnu.org/licenses/>.

;; The Cypress is a pretty simple single-issue processor.

(define_automaton "cypress_0,cypress_1")

(define_cpu_unit "cyp_memory, cyp_fpalu" "cypress_0")
(define_cpu_unit "cyp_fpmds" "cypress_1")

(define_insn_reservation "cyp_load" 2
  (and (eq_attr "cpu" "cypress")
    (eq_attr "type" "load,sload,fpload"))
  "cyp_memory, nothing")

(define_insn_reservation "cyp_fp_alu" 5
  (and (eq_attr "cpu" "cypress")
    (eq_attr "type" "fp,fpmove"))
  "cyp_fpalu, nothing*3")

(define_insn_reservation "cyp_fp_mult" 7
  (and (eq_attr "cpu" "cypress")
    (eq_attr "type" "fpmul"))
  "cyp_fpmds, nothing*5")

(define_insn_reservation "cyp_fp_div" 37
  (and (eq_attr "cpu" "cypress")
    (eq_attr "type" "fpdivs,fpdivd"))
  "cyp_fpmds, nothing*35")

(define_insn_reservation "cyp_fp_sqrt" 63
  (and (eq_attr "cpu" "cypress")
    (eq_attr "type" "fpsqrts,fpsqrtd"))
  "cyp_fpmds, nothing*61")