111
|
1 ;; DFA scheduling description of the Synopsys DesignWare ARC HS cpu
|
|
2 ;; for GNU C compiler
|
131
|
3 ;; Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
111
|
4 ;; Contributor: Claudiu Zissulescu <claudiu.zissulescu@synopsys.com>
|
|
5
|
|
6 ;; This file is part of GCC.
|
|
7
|
|
8 ;; GCC is free software; you can redistribute it and/or modify
|
|
9 ;; it under the terms of the GNU General Public License as published by
|
|
10 ;; the Free Software Foundation; either version 3, or (at your option)
|
|
11 ;; any later version.
|
|
12
|
|
13 ;; GCC is distributed in the hope that it will be useful,
|
|
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 ;; GNU General Public License for more details.
|
|
17
|
|
18 ;; You should have received a copy of the GNU General Public License
|
|
19 ;; along with GCC; see the file COPYING3. If not see
|
|
20 ;; <http://www.gnu.org/licenses/>.
|
|
21
|
|
22 (define_automaton "ARCHS")
|
|
23
|
|
24 (define_cpu_unit "hs_issue, hs_ld_st, divrem_hs, mul_hs, x1, x2" "ARCHS")
|
|
25
|
|
26 (define_insn_reservation "hs_data_load" 4
|
|
27 (and (match_test "TARGET_HS")
|
131
|
28 (eq_attr "tune" "none")
|
111
|
29 (eq_attr "type" "load"))
|
|
30 "hs_issue+hs_ld_st,hs_ld_st,nothing*2")
|
|
31
|
|
32 (define_insn_reservation "hs_data_store" 1
|
|
33 (and (match_test "TARGET_HS")
|
131
|
34 (eq_attr "tune" "none")
|
111
|
35 (eq_attr "type" "store"))
|
|
36 "hs_issue+hs_ld_st")
|
|
37
|
131
|
38 ;; Advanced ALU
|
|
39 (define_insn_reservation "hs_alu0" 4
|
111
|
40 (and (match_test "TARGET_HS")
|
131
|
41 (eq_attr "tune" "none")
|
111
|
42 (eq_attr "type" "cc_arith, two_cycle_core, shift, lr, sr"))
|
131
|
43 "hs_issue+x1,x2, nothing*2")
|
111
|
44
|
131
|
45 ;; Basic ALU
|
111
|
46 (define_insn_reservation "hs_alu1" 4
|
|
47 (and (match_test "TARGET_HS")
|
131
|
48 (eq_attr "tune" "none")
|
111
|
49 (eq_attr "type" "move, cmove, unary, binary, compare, misc"))
|
|
50 "hs_issue+x1, nothing*3")
|
|
51
|
|
52 (define_insn_reservation "hs_divrem" 13
|
|
53 (and (match_test "TARGET_HS")
|
|
54 (match_test "TARGET_DIVREM")
|
131
|
55 (eq_attr "tune" "none")
|
111
|
56 (eq_attr "type" "div_rem"))
|
|
57 "hs_issue+divrem_hs, (divrem_hs)*12")
|
|
58
|
131
|
59 (define_insn_reservation "hs_mul" 4
|
111
|
60 (and (match_test "TARGET_HS")
|
131
|
61 (eq_attr "tune" "none")
|
111
|
62 (eq_attr "type" "mul16_em, multi, umulti"))
|
|
63 "hs_issue+mul_hs, nothing*3")
|
|
64
|
131
|
65 ;; BYPASS Advanced ALU ->
|
111
|
66 (define_bypass 1 "hs_alu0" "hs_divrem")
|
|
67 (define_bypass 1 "hs_alu0" "hs_mul")
|
131
|
68 (define_bypass 2 "hs_alu0" "hs_alu0")
|
|
69 (define_bypass 1 "hs_alu0" "hs_alu1")
|
|
70 (define_bypass 1 "hs_alu0" "hs_data_load")
|
|
71 (define_bypass 1 "hs_alu0" "hs_data_store" "store_data_bypass_p")
|
|
72 (define_bypass 2 "hs_alu0" "hs_data_store")
|
111
|
73
|
131
|
74 ;; BYPASS Basic ALU ->
|
111
|
75 (define_bypass 1 "hs_alu1" "hs_alu1")
|
|
76 (define_bypass 1 "hs_alu1" "hs_data_store" "store_data_bypass_p")
|
131
|
77 (define_bypass 3 "hs_alu1" "hs_mul")
|
|
78 (define_bypass 3 "hs_alu1" "hs_divrem")
|
111
|
79
|
|
80 ;; BYPASS LD ->
|
|
81 (define_bypass 1 "hs_data_load" "hs_alu1")
|
|
82 (define_bypass 3 "hs_data_load" "hs_divrem")
|
|
83 (define_bypass 3 "hs_data_load" "hs_data_load")
|
|
84 (define_bypass 3 "hs_data_load" "hs_mul")
|
|
85 (define_bypass 1 "hs_data_load" "hs_data_store" "store_data_bypass_p")
|
|
86
|
|
87 ;; BYPASS MPY ->
|
131
|
88 (define_bypass 3 "hs_mul" "hs_mul")
|
111
|
89 (define_bypass 1 "hs_mul" "hs_alu1")
|
|
90 (define_bypass 3 "hs_mul" "hs_divrem")
|
|
91 (define_bypass 1 "hs_mul" "hs_data_store" "store_data_bypass_p")
|