annotate gcc/config/riscv/generic.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Generic DFA-based pipeline description for RISC-V targets.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 ;; Copyright (C) 2011-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 ;; Contributed by Andrew Waterman (andrew@sifive.com).
kono
parents:
diff changeset
4 ;; Based on MIPS target for GNU compiler.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 ;; This file is part of GCC.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 ;; GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
9 ;; under the terms of the GNU General Public License as published
kono
parents:
diff changeset
10 ;; by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
11 ;; option) any later version.
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
14 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
15 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
16 ;; License for more details.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
19 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
20 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 (define_automaton "pipe0")
kono
parents:
diff changeset
24 (define_cpu_unit "alu" "pipe0")
kono
parents:
diff changeset
25 (define_cpu_unit "imuldiv" "pipe0")
kono
parents:
diff changeset
26 (define_cpu_unit "fdivsqrt" "pipe0")
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 (define_insn_reservation "generic_alu" 1
kono
parents:
diff changeset
29 (eq_attr "type" "unknown,const,arith,shift,slt,multi,nop,logical,move")
kono
parents:
diff changeset
30 "alu")
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 (define_insn_reservation "generic_load" 3
kono
parents:
diff changeset
33 (eq_attr "type" "load,fpload")
kono
parents:
diff changeset
34 "alu")
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 (define_insn_reservation "generic_store" 1
kono
parents:
diff changeset
37 (eq_attr "type" "store,fpstore")
kono
parents:
diff changeset
38 "alu")
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 (define_insn_reservation "generic_xfer" 3
kono
parents:
diff changeset
41 (eq_attr "type" "mfc,mtc,fcvt,fmove,fcmp")
kono
parents:
diff changeset
42 "alu")
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 (define_insn_reservation "generic_branch" 1
kono
parents:
diff changeset
45 (eq_attr "type" "branch,jump,call")
kono
parents:
diff changeset
46 "alu")
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 (define_insn_reservation "generic_imul" 10
kono
parents:
diff changeset
49 (eq_attr "type" "imul")
kono
parents:
diff changeset
50 "imuldiv*10")
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 (define_insn_reservation "generic_idivsi" 34
kono
parents:
diff changeset
53 (and (eq_attr "type" "idiv")
kono
parents:
diff changeset
54 (eq_attr "mode" "SI"))
kono
parents:
diff changeset
55 "imuldiv*34")
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 (define_insn_reservation "generic_idivdi" 66
kono
parents:
diff changeset
58 (and (eq_attr "type" "idiv")
kono
parents:
diff changeset
59 (eq_attr "mode" "DI"))
kono
parents:
diff changeset
60 "imuldiv*66")
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 (define_insn_reservation "generic_fmul_single" 5
kono
parents:
diff changeset
63 (and (eq_attr "type" "fadd,fmul,fmadd")
kono
parents:
diff changeset
64 (eq_attr "mode" "SF"))
kono
parents:
diff changeset
65 "alu")
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 (define_insn_reservation "generic_fmul_double" 7
kono
parents:
diff changeset
68 (and (eq_attr "type" "fadd,fmul,fmadd")
kono
parents:
diff changeset
69 (eq_attr "mode" "DF"))
kono
parents:
diff changeset
70 "alu")
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 (define_insn_reservation "generic_fdiv" 20
kono
parents:
diff changeset
73 (eq_attr "type" "fdiv")
kono
parents:
diff changeset
74 "fdivsqrt*20")
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 (define_insn_reservation "generic_fsqrt" 25
kono
parents:
diff changeset
77 (eq_attr "type" "fsqrt")
kono
parents:
diff changeset
78 "fdivsqrt*25")