1;; -*- buffer-read-only: t -*-
2;; Generated automatically from c6x-sched.md.in by gensched.sh
3
4;; Definitions for side 1, cross n
5
6;; Scheduling description for TI C6X.
7;; Copyright (C) 2010-2018 Free Software Foundation, Inc.
8;; Contributed by Bernd Schmidt <bernds@codesourcery.com>
9;; Contributed by CodeSourcery.
10;;
11;; This file is part of GCC.
12;;
13;; GCC is free software; you can redistribute it and/or modify
14;; it under the terms of the GNU General Public License as published by
15;; the Free Software Foundation; either version 3, or (at your option)
16;; any later version.
17;;
18;; GCC is distributed in the hope that it will be useful,
19;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21;; GNU General Public License for more details.
22;;
23;; You should have received a copy of the GNU General Public License
24;; along with GCC; see the file COPYING3.  If not see
25;; <http://www.gnu.org/licenses/>.
26
27;; Input file for gensched.sh We process this file multiple times,
28;; replacing 1 with either 1 or 2 for each of the sides of the
29;; machine, and a correspondingly with "a" or "b".  n and
30;;  are replaced with yes/no and the appropriate reservation.
31
32(define_insn_reservation "load_d1n" 5
33  (and (eq_attr "type" "load")
34       (and (eq_attr "cross" "n")
35	    (and (eq_attr "units" "d_addr")
36		 (eq_attr "addr_regfile" "a"))))
37  "d1+t1")
38
39(define_insn_reservation "store_d1n" 1
40  (and (eq_attr "type" "store")
41       (and (eq_attr "cross" "n")
42	    (and (eq_attr "units" "d_addr")
43		 (eq_attr "addr_regfile" "a"))))
44  "d1+t1")
45
46(define_insn_reservation "loadn_d1n" 5
47  (and (eq_attr "type" "loadn")
48       (and (eq_attr "cross" "n")
49	    (and (eq_attr "units" "d_addr")
50		 (eq_attr "addr_regfile" "a"))))
51  "d1+t1+t2")
52
53(define_insn_reservation "storen_d1n" 1
54  (and (eq_attr "type" "storen")
55       (and (eq_attr "cross" "n")
56	    (and (eq_attr "units" "d_addr")
57		 (eq_attr "addr_regfile" "a"))))
58  "d1+t1+t2")
59
60(define_insn_reservation "single_d1n" 1
61  (and (eq_attr "type" "single")
62       (and (eq_attr "cross" "n")
63	    (and (eq_attr "units" "d")
64		 (eq_attr "dest_regfile" "a"))))
65  "d1")
66
67(define_insn_reservation "single_l1n" 1
68  (and (eq_attr "type" "single")
69       (and (eq_attr "cross" "n")
70	    (and (eq_attr "units" "l")
71		 (eq_attr "dest_regfile" "a"))))
72  "l1+l1w")
73
74(define_insn_reservation "fp4_l1n" 4
75  (and (eq_attr "type" "fp4")
76       (and (eq_attr "cross" "n")
77	    (and (eq_attr "units" "l")
78		 (eq_attr "dest_regfile" "a"))))
79  "l1,nothing*2,l1w")
80
81(define_insn_reservation "intdp_l1n" 5
82  (and (eq_attr "type" "intdp")
83       (and (eq_attr "cross" "n")
84	    (and (eq_attr "units" "l")
85		 (eq_attr "dest_regfile" "a"))))
86  "l1,nothing*2,l1w*2")
87
88(define_insn_reservation "adddp_l1n" 7
89  (and (eq_attr "type" "adddp")
90       (and (eq_attr "cross" "n")
91	    (and (eq_attr "units" "l")
92		 (eq_attr "dest_regfile" "a"))))
93  "(l1)*2,nothing*3,l1w*2")
94
95(define_insn_reservation "branch_s1n" 6
96  (and (eq_attr "type" "branch")
97       (and (eq_attr "cross" "n")
98	    (and (eq_attr "units" "s")
99		 (eq_attr "dest_regfile" "a"))))
100  "(s1+s1w)+br1")
101
102(define_insn_reservation "call_addkpc_s1n" 6
103  (and (eq_attr "type" "call")
104       (and (ne (symbol_ref "TARGET_INSNS_64") (const_int 0))
105	    (and (eq_attr "cross" "n")
106		 (and (eq_attr "units" "s")
107		      (eq_attr "dest_regfile" "a")))))
108  "(s1+s1w)+br1,s2+br0+br1")
109
110(define_insn_reservation "call_mvk_s1n" 6
111  (and (eq_attr "type" "call")
112       (and (eq (symbol_ref "TARGET_INSNS_64") (const_int 0))
113	    (and (eq_attr "cross" "n")
114		 (and (eq_attr "units" "s")
115		      (eq_attr "dest_regfile" "a")))))
116  "(s1+s1w)+br1,s2,s2")
117
118(define_insn_reservation "single_s1n" 1
119  (and (eq_attr "type" "single")
120       (and (eq_attr "cross" "n")
121	    (and (eq_attr "units" "s")
122		 (eq_attr "dest_regfile" "a"))))
123  "(s1+s1w)")
124
125(define_insn_reservation "cmpdp_s1n" 2
126  (and (eq_attr "type" "cmpdp")
127       (and (eq_attr "cross" "n")
128	    (and (eq_attr "units" "s")
129		 (eq_attr "dest_regfile" "a"))))
130  "s1,(s1)+s1w")
131
132(define_insn_reservation "dp2_s1n" 2
133  (and (eq_attr "type" "dp2")
134       (and (eq_attr "cross" "n")
135	    (and (eq_attr "units" "s")
136		 (eq_attr "dest_regfile" "a"))))
137  "s1+s1w,s1w")
138
139(define_insn_reservation "fp4_s1n" 4
140  (and (eq_attr "type" "fp4")
141       (and (eq_attr "cross" "n")
142	    (and (eq_attr "units" "s")
143		 (eq_attr "dest_regfile" "a"))))
144  "s1,nothing*2,s1w")
145
146(define_insn_reservation "mvilc4_s1n" 4
147  (and (eq_attr "type" "mvilc")
148       (and (eq_attr "cross" "n")
149	    (and (eq_attr "units" "s")
150		 (eq_attr "dest_regfile" "a"))))
151  "(s1+s1w)")
152
153(define_insn_reservation "single_dl1n" 1
154  (and (eq_attr "type" "single")
155       (and (eq_attr "cross" "n")
156	    (and (eq_attr "units" "dl")
157		 (eq_attr "dest_regfile" "a"))))
158  "(d1|(l1+l1w))")
159
160(define_insn_reservation "single_ds1n" 1
161  (and (eq_attr "type" "single")
162       (and (eq_attr "cross" "n")
163	    (and (eq_attr "units" "ds")
164		 (eq_attr "dest_regfile" "a"))))
165  "(d1|(s1+s1w))")
166
167(define_insn_reservation "single_ls1n" 1
168  (and (eq_attr "type" "single")
169       (and (eq_attr "cross" "n")
170	    (and (eq_attr "units" "ls")
171		 (eq_attr "dest_regfile" "a"))))
172  "((l1+l1w)|(s1+s1w))")
173
174(define_insn_reservation "dp2_l1n" 2
175  (and (eq_attr "type" "dp2")
176       (and (eq_attr "cross" "n")
177	    (and (eq_attr "units" "l")
178		 (eq_attr "dest_regfile" "a"))))
179  "l1+l1w,l1w")
180
181(define_insn_reservation "fp4_ls1n" 4
182  (and (eq_attr "type" "fp4")
183       (and (eq_attr "cross" "n")
184	    (and (eq_attr "units" "ls")
185		 (eq_attr "dest_regfile" "a"))))
186  "(fps1+s1,nothing*2,s1w)|(fpl1+l1,nothing*2,l1w)")
187
188(define_insn_reservation "adddp_ls1n" 7
189  (and (eq_attr "type" "adddp")
190       (and (eq_attr "cross" "n")
191	    (and (eq_attr "units" "ls")
192		 (eq_attr "dest_regfile" "a"))))
193  "(adddps1+(s1)*2,nothing*3,s1w*2)|(adddpl1+(l1)*2,nothing*3,l1w*2)")
194
195(define_insn_reservation "single_dls1n" 1
196  (and (eq_attr "type" "single")
197       (and (eq_attr "cross" "n")
198	    (and (eq_attr "units" "dls")
199		 (eq_attr "dest_regfile" "a"))))
200  "(d1|(l1+l1w)|(s1+s1w))")
201
202(define_insn_reservation "mpy2_m1n" 2
203  (and (eq_attr "type" "mpy2")
204       (and (eq_attr "cross" "n")
205	    (and (eq_attr "units" "m")
206		 (eq_attr "dest_regfile" "a"))))
207  "m1,m1w")
208
209(define_insn_reservation "mpy4_m1n" 4
210  (and (eq_attr "type" "mpy4")
211       (and (eq_attr "cross" "n")
212	    (and (eq_attr "units" "m")
213		 (eq_attr "dest_regfile" "a"))))
214  "m1,nothing,nothing,m1w")
215
216(define_insn_reservation "mpydp_m1n" 10
217  (and (eq_attr "type" "mpydp")
218       (and (eq_attr "cross" "n")
219	    (and (eq_attr "units" "m")
220		 (eq_attr "dest_regfile" "a"))))
221  "(m1)*4,nothing*4,m1w*2")
222
223(define_insn_reservation "mpyspdp_m1n" 7
224  (and (eq_attr "type" "mpyspdp")
225       (and (eq_attr "cross" "n")
226	    (and (eq_attr "units" "m")
227		 (eq_attr "dest_regfile" "a"))))
228  "(m1)*2,nothing*3,m1w*2")
229
230(define_insn_reservation "mpysp2dp_m1n" 5
231  (and (eq_attr "type" "mpysp2dp")
232       (and (eq_attr "cross" "n")
233	    (and (eq_attr "units" "m")
234		 (eq_attr "dest_regfile" "a"))))
235  "m1,nothing*2,m1w*2")
236
237;; Definitions for side 2, cross n
238
239;; Scheduling description for TI C6X.
240;; Copyright (C) 2010-2018 Free Software Foundation, Inc.
241;; Contributed by Bernd Schmidt <bernds@codesourcery.com>
242;; Contributed by CodeSourcery.
243;;
244;; This file is part of GCC.
245;;
246;; GCC is free software; you can redistribute it and/or modify
247;; it under the terms of the GNU General Public License as published by
248;; the Free Software Foundation; either version 3, or (at your option)
249;; any later version.
250;;
251;; GCC is distributed in the hope that it will be useful,
252;; but WITHOUT ANY WARRANTY; without even the implied warranty of
253;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
254;; GNU General Public License for more details.
255;;
256;; You should have received a copy of the GNU General Public License
257;; along with GCC; see the file COPYING3.  If not see
258;; <http://www.gnu.org/licenses/>.
259
260;; Input file for gensched.sh We process this file multiple times,
261;; replacing 2 with either 1 or 2 for each of the sides of the
262;; machine, and b correspondingly with "a" or "b".  n and
263;;  are replaced with yes/no and the appropriate reservation.
264
265(define_insn_reservation "load_d2n" 5
266  (and (eq_attr "type" "load")
267       (and (eq_attr "cross" "n")
268	    (and (eq_attr "units" "d_addr")
269		 (eq_attr "addr_regfile" "b"))))
270  "d2+t2")
271
272(define_insn_reservation "store_d2n" 1
273  (and (eq_attr "type" "store")
274       (and (eq_attr "cross" "n")
275	    (and (eq_attr "units" "d_addr")
276		 (eq_attr "addr_regfile" "b"))))
277  "d2+t2")
278
279(define_insn_reservation "loadn_d2n" 5
280  (and (eq_attr "type" "loadn")
281       (and (eq_attr "cross" "n")
282	    (and (eq_attr "units" "d_addr")
283		 (eq_attr "addr_regfile" "b"))))
284  "d2+t1+t2")
285
286(define_insn_reservation "storen_d2n" 1
287  (and (eq_attr "type" "storen")
288       (and (eq_attr "cross" "n")
289	    (and (eq_attr "units" "d_addr")
290		 (eq_attr "addr_regfile" "b"))))
291  "d2+t1+t2")
292
293(define_insn_reservation "single_d2n" 1
294  (and (eq_attr "type" "single")
295       (and (eq_attr "cross" "n")
296	    (and (eq_attr "units" "d")
297		 (eq_attr "dest_regfile" "b"))))
298  "d2")
299
300(define_insn_reservation "single_l2n" 1
301  (and (eq_attr "type" "single")
302       (and (eq_attr "cross" "n")
303	    (and (eq_attr "units" "l")
304		 (eq_attr "dest_regfile" "b"))))
305  "l2+l2w")
306
307(define_insn_reservation "fp4_l2n" 4
308  (and (eq_attr "type" "fp4")
309       (and (eq_attr "cross" "n")
310	    (and (eq_attr "units" "l")
311		 (eq_attr "dest_regfile" "b"))))
312  "l2,nothing*2,l2w")
313
314(define_insn_reservation "intdp_l2n" 5
315  (and (eq_attr "type" "intdp")
316       (and (eq_attr "cross" "n")
317	    (and (eq_attr "units" "l")
318		 (eq_attr "dest_regfile" "b"))))
319  "l2,nothing*2,l2w*2")
320
321(define_insn_reservation "adddp_l2n" 7
322  (and (eq_attr "type" "adddp")
323       (and (eq_attr "cross" "n")
324	    (and (eq_attr "units" "l")
325		 (eq_attr "dest_regfile" "b"))))
326  "(l2)*2,nothing*3,l2w*2")
327
328(define_insn_reservation "branch_s2n" 6
329  (and (eq_attr "type" "branch")
330       (and (eq_attr "cross" "n")
331	    (and (eq_attr "units" "s")
332		 (eq_attr "dest_regfile" "b"))))
333  "(s2+s2w)+br1")
334
335(define_insn_reservation "call_addkpc_s2n" 6
336  (and (eq_attr "type" "call")
337       (and (ne (symbol_ref "TARGET_INSNS_64") (const_int 0))
338	    (and (eq_attr "cross" "n")
339		 (and (eq_attr "units" "s")
340		      (eq_attr "dest_regfile" "b")))))
341  "(s2+s2w)+br1,s2+br0+br1")
342
343(define_insn_reservation "call_mvk_s2n" 6
344  (and (eq_attr "type" "call")
345       (and (eq (symbol_ref "TARGET_INSNS_64") (const_int 0))
346	    (and (eq_attr "cross" "n")
347		 (and (eq_attr "units" "s")
348		      (eq_attr "dest_regfile" "b")))))
349  "(s2+s2w)+br1,s2,s2")
350
351(define_insn_reservation "single_s2n" 1
352  (and (eq_attr "type" "single")
353       (and (eq_attr "cross" "n")
354	    (and (eq_attr "units" "s")
355		 (eq_attr "dest_regfile" "b"))))
356  "(s2+s2w)")
357
358(define_insn_reservation "cmpdp_s2n" 2
359  (and (eq_attr "type" "cmpdp")
360       (and (eq_attr "cross" "n")
361	    (and (eq_attr "units" "s")
362		 (eq_attr "dest_regfile" "b"))))
363  "s2,(s2)+s2w")
364
365(define_insn_reservation "dp2_s2n" 2
366  (and (eq_attr "type" "dp2")
367       (and (eq_attr "cross" "n")
368	    (and (eq_attr "units" "s")
369		 (eq_attr "dest_regfile" "b"))))
370  "s2+s2w,s2w")
371
372(define_insn_reservation "fp4_s2n" 4
373  (and (eq_attr "type" "fp4")
374       (and (eq_attr "cross" "n")
375	    (and (eq_attr "units" "s")
376		 (eq_attr "dest_regfile" "b"))))
377  "s2,nothing*2,s2w")
378
379(define_insn_reservation "mvilc4_s2n" 4
380  (and (eq_attr "type" "mvilc")
381       (and (eq_attr "cross" "n")
382	    (and (eq_attr "units" "s")
383		 (eq_attr "dest_regfile" "b"))))
384  "(s2+s2w)")
385
386(define_insn_reservation "single_dl2n" 1
387  (and (eq_attr "type" "single")
388       (and (eq_attr "cross" "n")
389	    (and (eq_attr "units" "dl")
390		 (eq_attr "dest_regfile" "b"))))
391  "(d2|(l2+l2w))")
392
393(define_insn_reservation "single_ds2n" 1
394  (and (eq_attr "type" "single")
395       (and (eq_attr "cross" "n")
396	    (and (eq_attr "units" "ds")
397		 (eq_attr "dest_regfile" "b"))))
398  "(d2|(s2+s2w))")
399
400(define_insn_reservation "single_ls2n" 1
401  (and (eq_attr "type" "single")
402       (and (eq_attr "cross" "n")
403	    (and (eq_attr "units" "ls")
404		 (eq_attr "dest_regfile" "b"))))
405  "((l2+l2w)|(s2+s2w))")
406
407(define_insn_reservation "dp2_l2n" 2
408  (and (eq_attr "type" "dp2")
409       (and (eq_attr "cross" "n")
410	    (and (eq_attr "units" "l")
411		 (eq_attr "dest_regfile" "b"))))
412  "l2+l2w,l2w")
413
414(define_insn_reservation "fp4_ls2n" 4
415  (and (eq_attr "type" "fp4")
416       (and (eq_attr "cross" "n")
417	    (and (eq_attr "units" "ls")
418		 (eq_attr "dest_regfile" "b"))))
419  "(fps2+s2,nothing*2,s2w)|(fpl2+l2,nothing*2,l2w)")
420
421(define_insn_reservation "adddp_ls2n" 7
422  (and (eq_attr "type" "adddp")
423       (and (eq_attr "cross" "n")
424	    (and (eq_attr "units" "ls")
425		 (eq_attr "dest_regfile" "b"))))
426  "(adddps2+(s2)*2,nothing*3,s2w*2)|(adddpl2+(l2)*2,nothing*3,l2w*2)")
427
428(define_insn_reservation "single_dls2n" 1
429  (and (eq_attr "type" "single")
430       (and (eq_attr "cross" "n")
431	    (and (eq_attr "units" "dls")
432		 (eq_attr "dest_regfile" "b"))))
433  "(d2|(l2+l2w)|(s2+s2w))")
434
435(define_insn_reservation "mpy2_m2n" 2
436  (and (eq_attr "type" "mpy2")
437       (and (eq_attr "cross" "n")
438	    (and (eq_attr "units" "m")
439		 (eq_attr "dest_regfile" "b"))))
440  "m2,m2w")
441
442(define_insn_reservation "mpy4_m2n" 4
443  (and (eq_attr "type" "mpy4")
444       (and (eq_attr "cross" "n")
445	    (and (eq_attr "units" "m")
446		 (eq_attr "dest_regfile" "b"))))
447  "m2,nothing,nothing,m2w")
448
449(define_insn_reservation "mpydp_m2n" 10
450  (and (eq_attr "type" "mpydp")
451       (and (eq_attr "cross" "n")
452	    (and (eq_attr "units" "m")
453		 (eq_attr "dest_regfile" "b"))))
454  "(m2)*4,nothing*4,m2w*2")
455
456(define_insn_reservation "mpyspdp_m2n" 7
457  (and (eq_attr "type" "mpyspdp")
458       (and (eq_attr "cross" "n")
459	    (and (eq_attr "units" "m")
460		 (eq_attr "dest_regfile" "b"))))
461  "(m2)*2,nothing*3,m2w*2")
462
463(define_insn_reservation "mpysp2dp_m2n" 5
464  (and (eq_attr "type" "mpysp2dp")
465       (and (eq_attr "cross" "n")
466	    (and (eq_attr "units" "m")
467		 (eq_attr "dest_regfile" "b"))))
468  "m2,nothing*2,m2w*2")
469
470;; Definitions for side 1, cross y
471
472;; Scheduling description for TI C6X.
473;; Copyright (C) 2010-2018 Free Software Foundation, Inc.
474;; Contributed by Bernd Schmidt <bernds@codesourcery.com>
475;; Contributed by CodeSourcery.
476;;
477;; This file is part of GCC.
478;;
479;; GCC is free software; you can redistribute it and/or modify
480;; it under the terms of the GNU General Public License as published by
481;; the Free Software Foundation; either version 3, or (at your option)
482;; any later version.
483;;
484;; GCC is distributed in the hope that it will be useful,
485;; but WITHOUT ANY WARRANTY; without even the implied warranty of
486;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
487;; GNU General Public License for more details.
488;;
489;; You should have received a copy of the GNU General Public License
490;; along with GCC; see the file COPYING3.  If not see
491;; <http://www.gnu.org/licenses/>.
492
493;; Input file for gensched.sh We process this file multiple times,
494;; replacing 1 with either 1 or 2 for each of the sides of the
495;; machine, and a correspondingly with "a" or "b".  y and
496;; +x1 are replaced with yes/no and the appropriate reservation.
497
498(define_insn_reservation "load_d1y" 5
499  (and (eq_attr "type" "load")
500       (and (eq_attr "cross" "y")
501	    (and (eq_attr "units" "d_addr")
502		 (eq_attr "addr_regfile" "a"))))
503  "d1+t2")
504
505(define_insn_reservation "store_d1y" 1
506  (and (eq_attr "type" "store")
507       (and (eq_attr "cross" "y")
508	    (and (eq_attr "units" "d_addr")
509		 (eq_attr "addr_regfile" "a"))))
510  "d1+t2")
511
512(define_insn_reservation "loadn_d1y" 5
513  (and (eq_attr "type" "loadn")
514       (and (eq_attr "cross" "y")
515	    (and (eq_attr "units" "d_addr")
516		 (eq_attr "addr_regfile" "a"))))
517  "d1+t1+t2")
518
519(define_insn_reservation "storen_d1y" 1
520  (and (eq_attr "type" "storen")
521       (and (eq_attr "cross" "y")
522	    (and (eq_attr "units" "d_addr")
523		 (eq_attr "addr_regfile" "a"))))
524  "d1+t1+t2")
525
526(define_insn_reservation "single_d1y" 1
527  (and (eq_attr "type" "single")
528       (and (eq_attr "cross" "y")
529	    (and (eq_attr "units" "d")
530		 (eq_attr "dest_regfile" "a"))))
531  "d1+x1")
532
533(define_insn_reservation "single_l1y" 1
534  (and (eq_attr "type" "single")
535       (and (eq_attr "cross" "y")
536	    (and (eq_attr "units" "l")
537		 (eq_attr "dest_regfile" "a"))))
538  "l1+l1w+x1")
539
540(define_insn_reservation "fp4_l1y" 4
541  (and (eq_attr "type" "fp4")
542       (and (eq_attr "cross" "y")
543	    (and (eq_attr "units" "l")
544		 (eq_attr "dest_regfile" "a"))))
545  "l1+x1,nothing*2,l1w")
546
547(define_insn_reservation "intdp_l1y" 5
548  (and (eq_attr "type" "intdp")
549       (and (eq_attr "cross" "y")
550	    (and (eq_attr "units" "l")
551		 (eq_attr "dest_regfile" "a"))))
552  "l1+x1,nothing*2,l1w*2")
553
554(define_insn_reservation "adddp_l1y" 7
555  (and (eq_attr "type" "adddp")
556       (and (eq_attr "cross" "y")
557	    (and (eq_attr "units" "l")
558		 (eq_attr "dest_regfile" "a"))))
559  "(l1+x1)*2,nothing*3,l1w*2")
560
561(define_insn_reservation "branch_s1y" 6
562  (and (eq_attr "type" "branch")
563       (and (eq_attr "cross" "y")
564	    (and (eq_attr "units" "s")
565		 (eq_attr "dest_regfile" "a"))))
566  "(s1+s1w)+x1+br1")
567
568(define_insn_reservation "call_addkpc_s1y" 6
569  (and (eq_attr "type" "call")
570       (and (ne (symbol_ref "TARGET_INSNS_64") (const_int 0))
571	    (and (eq_attr "cross" "y")
572		 (and (eq_attr "units" "s")
573		      (eq_attr "dest_regfile" "a")))))
574  "(s1+s1w)+x1+br1,s2+br0+br1")
575
576(define_insn_reservation "call_mvk_s1y" 6
577  (and (eq_attr "type" "call")
578       (and (eq (symbol_ref "TARGET_INSNS_64") (const_int 0))
579	    (and (eq_attr "cross" "y")
580		 (and (eq_attr "units" "s")
581		      (eq_attr "dest_regfile" "a")))))
582  "(s1+s1w)+x1+br1,s2,s2")
583
584(define_insn_reservation "single_s1y" 1
585  (and (eq_attr "type" "single")
586       (and (eq_attr "cross" "y")
587	    (and (eq_attr "units" "s")
588		 (eq_attr "dest_regfile" "a"))))
589  "(s1+s1w)+x1")
590
591(define_insn_reservation "cmpdp_s1y" 2
592  (and (eq_attr "type" "cmpdp")
593       (and (eq_attr "cross" "y")
594	    (and (eq_attr "units" "s")
595		 (eq_attr "dest_regfile" "a"))))
596  "s1+x1,(s1+x1)+s1w")
597
598(define_insn_reservation "dp2_s1y" 2
599  (and (eq_attr "type" "dp2")
600       (and (eq_attr "cross" "y")
601	    (and (eq_attr "units" "s")
602		 (eq_attr "dest_regfile" "a"))))
603  "s1+s1w+x1,s1w")
604
605(define_insn_reservation "fp4_s1y" 4
606  (and (eq_attr "type" "fp4")
607       (and (eq_attr "cross" "y")
608	    (and (eq_attr "units" "s")
609		 (eq_attr "dest_regfile" "a"))))
610  "s1+x1,nothing*2,s1w")
611
612(define_insn_reservation "mvilc4_s1y" 4
613  (and (eq_attr "type" "mvilc")
614       (and (eq_attr "cross" "y")
615	    (and (eq_attr "units" "s")
616		 (eq_attr "dest_regfile" "a"))))
617  "(s1+s1w)+x1")
618
619(define_insn_reservation "single_dl1y" 1
620  (and (eq_attr "type" "single")
621       (and (eq_attr "cross" "y")
622	    (and (eq_attr "units" "dl")
623		 (eq_attr "dest_regfile" "a"))))
624  "(d1|(l1+l1w))+x1")
625
626(define_insn_reservation "single_ds1y" 1
627  (and (eq_attr "type" "single")
628       (and (eq_attr "cross" "y")
629	    (and (eq_attr "units" "ds")
630		 (eq_attr "dest_regfile" "a"))))
631  "(d1|(s1+s1w))+x1")
632
633(define_insn_reservation "single_ls1y" 1
634  (and (eq_attr "type" "single")
635       (and (eq_attr "cross" "y")
636	    (and (eq_attr "units" "ls")
637		 (eq_attr "dest_regfile" "a"))))
638  "((l1+l1w)|(s1+s1w))+x1")
639
640(define_insn_reservation "dp2_l1y" 2
641  (and (eq_attr "type" "dp2")
642       (and (eq_attr "cross" "y")
643	    (and (eq_attr "units" "l")
644		 (eq_attr "dest_regfile" "a"))))
645  "l1+l1w+x1,l1w")
646
647(define_insn_reservation "fp4_ls1y" 4
648  (and (eq_attr "type" "fp4")
649       (and (eq_attr "cross" "y")
650	    (and (eq_attr "units" "ls")
651		 (eq_attr "dest_regfile" "a"))))
652  "(fps1+s1+x1,nothing*2,s1w)|(fpl1+l1+x1,nothing*2,l1w)")
653
654(define_insn_reservation "adddp_ls1y" 7
655  (and (eq_attr "type" "adddp")
656       (and (eq_attr "cross" "y")
657	    (and (eq_attr "units" "ls")
658		 (eq_attr "dest_regfile" "a"))))
659  "(adddps1+(s1+x1)*2,nothing*3,s1w*2)|(adddpl1+(l1+x1)*2,nothing*3,l1w*2)")
660
661(define_insn_reservation "single_dls1y" 1
662  (and (eq_attr "type" "single")
663       (and (eq_attr "cross" "y")
664	    (and (eq_attr "units" "dls")
665		 (eq_attr "dest_regfile" "a"))))
666  "(d1|(l1+l1w)|(s1+s1w))+x1")
667
668(define_insn_reservation "mpy2_m1y" 2
669  (and (eq_attr "type" "mpy2")
670       (and (eq_attr "cross" "y")
671	    (and (eq_attr "units" "m")
672		 (eq_attr "dest_regfile" "a"))))
673  "m1+x1,m1w")
674
675(define_insn_reservation "mpy4_m1y" 4
676  (and (eq_attr "type" "mpy4")
677       (and (eq_attr "cross" "y")
678	    (and (eq_attr "units" "m")
679		 (eq_attr "dest_regfile" "a"))))
680  "m1+x1,nothing,nothing,m1w")
681
682(define_insn_reservation "mpydp_m1y" 10
683  (and (eq_attr "type" "mpydp")
684       (and (eq_attr "cross" "y")
685	    (and (eq_attr "units" "m")
686		 (eq_attr "dest_regfile" "a"))))
687  "(m1+x1)*4,nothing*4,m1w*2")
688
689(define_insn_reservation "mpyspdp_m1y" 7
690  (and (eq_attr "type" "mpyspdp")
691       (and (eq_attr "cross" "y")
692	    (and (eq_attr "units" "m")
693		 (eq_attr "dest_regfile" "a"))))
694  "(m1+x1)*2,nothing*3,m1w*2")
695
696(define_insn_reservation "mpysp2dp_m1y" 5
697  (and (eq_attr "type" "mpysp2dp")
698       (and (eq_attr "cross" "y")
699	    (and (eq_attr "units" "m")
700		 (eq_attr "dest_regfile" "a"))))
701  "m1+x1,nothing*2,m1w*2")
702
703;; Definitions for side 2, cross y
704
705;; Scheduling description for TI C6X.
706;; Copyright (C) 2010-2018 Free Software Foundation, Inc.
707;; Contributed by Bernd Schmidt <bernds@codesourcery.com>
708;; Contributed by CodeSourcery.
709;;
710;; This file is part of GCC.
711;;
712;; GCC is free software; you can redistribute it and/or modify
713;; it under the terms of the GNU General Public License as published by
714;; the Free Software Foundation; either version 3, or (at your option)
715;; any later version.
716;;
717;; GCC is distributed in the hope that it will be useful,
718;; but WITHOUT ANY WARRANTY; without even the implied warranty of
719;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
720;; GNU General Public License for more details.
721;;
722;; You should have received a copy of the GNU General Public License
723;; along with GCC; see the file COPYING3.  If not see
724;; <http://www.gnu.org/licenses/>.
725
726;; Input file for gensched.sh We process this file multiple times,
727;; replacing 2 with either 1 or 2 for each of the sides of the
728;; machine, and b correspondingly with "a" or "b".  y and
729;; +x2 are replaced with yes/no and the appropriate reservation.
730
731(define_insn_reservation "load_d2y" 5
732  (and (eq_attr "type" "load")
733       (and (eq_attr "cross" "y")
734	    (and (eq_attr "units" "d_addr")
735		 (eq_attr "addr_regfile" "b"))))
736  "d2+t1")
737
738(define_insn_reservation "store_d2y" 1
739  (and (eq_attr "type" "store")
740       (and (eq_attr "cross" "y")
741	    (and (eq_attr "units" "d_addr")
742		 (eq_attr "addr_regfile" "b"))))
743  "d2+t1")
744
745(define_insn_reservation "loadn_d2y" 5
746  (and (eq_attr "type" "loadn")
747       (and (eq_attr "cross" "y")
748	    (and (eq_attr "units" "d_addr")
749		 (eq_attr "addr_regfile" "b"))))
750  "d2+t1+t2")
751
752(define_insn_reservation "storen_d2y" 1
753  (and (eq_attr "type" "storen")
754       (and (eq_attr "cross" "y")
755	    (and (eq_attr "units" "d_addr")
756		 (eq_attr "addr_regfile" "b"))))
757  "d2+t1+t2")
758
759(define_insn_reservation "single_d2y" 1
760  (and (eq_attr "type" "single")
761       (and (eq_attr "cross" "y")
762	    (and (eq_attr "units" "d")
763		 (eq_attr "dest_regfile" "b"))))
764  "d2+x2")
765
766(define_insn_reservation "single_l2y" 1
767  (and (eq_attr "type" "single")
768       (and (eq_attr "cross" "y")
769	    (and (eq_attr "units" "l")
770		 (eq_attr "dest_regfile" "b"))))
771  "l2+l2w+x2")
772
773(define_insn_reservation "fp4_l2y" 4
774  (and (eq_attr "type" "fp4")
775       (and (eq_attr "cross" "y")
776	    (and (eq_attr "units" "l")
777		 (eq_attr "dest_regfile" "b"))))
778  "l2+x2,nothing*2,l2w")
779
780(define_insn_reservation "intdp_l2y" 5
781  (and (eq_attr "type" "intdp")
782       (and (eq_attr "cross" "y")
783	    (and (eq_attr "units" "l")
784		 (eq_attr "dest_regfile" "b"))))
785  "l2+x2,nothing*2,l2w*2")
786
787(define_insn_reservation "adddp_l2y" 7
788  (and (eq_attr "type" "adddp")
789       (and (eq_attr "cross" "y")
790	    (and (eq_attr "units" "l")
791		 (eq_attr "dest_regfile" "b"))))
792  "(l2+x2)*2,nothing*3,l2w*2")
793
794(define_insn_reservation "branch_s2y" 6
795  (and (eq_attr "type" "branch")
796       (and (eq_attr "cross" "y")
797	    (and (eq_attr "units" "s")
798		 (eq_attr "dest_regfile" "b"))))
799  "(s2+s2w)+x2+br1")
800
801(define_insn_reservation "call_addkpc_s2y" 6
802  (and (eq_attr "type" "call")
803       (and (ne (symbol_ref "TARGET_INSNS_64") (const_int 0))
804	    (and (eq_attr "cross" "y")
805		 (and (eq_attr "units" "s")
806		      (eq_attr "dest_regfile" "b")))))
807  "(s2+s2w)+x2+br1,s2+br0+br1")
808
809(define_insn_reservation "call_mvk_s2y" 6
810  (and (eq_attr "type" "call")
811       (and (eq (symbol_ref "TARGET_INSNS_64") (const_int 0))
812	    (and (eq_attr "cross" "y")
813		 (and (eq_attr "units" "s")
814		      (eq_attr "dest_regfile" "b")))))
815  "(s2+s2w)+x2+br1,s2,s2")
816
817(define_insn_reservation "single_s2y" 1
818  (and (eq_attr "type" "single")
819       (and (eq_attr "cross" "y")
820	    (and (eq_attr "units" "s")
821		 (eq_attr "dest_regfile" "b"))))
822  "(s2+s2w)+x2")
823
824(define_insn_reservation "cmpdp_s2y" 2
825  (and (eq_attr "type" "cmpdp")
826       (and (eq_attr "cross" "y")
827	    (and (eq_attr "units" "s")
828		 (eq_attr "dest_regfile" "b"))))
829  "s2+x2,(s2+x2)+s2w")
830
831(define_insn_reservation "dp2_s2y" 2
832  (and (eq_attr "type" "dp2")
833       (and (eq_attr "cross" "y")
834	    (and (eq_attr "units" "s")
835		 (eq_attr "dest_regfile" "b"))))
836  "s2+s2w+x2,s2w")
837
838(define_insn_reservation "fp4_s2y" 4
839  (and (eq_attr "type" "fp4")
840       (and (eq_attr "cross" "y")
841	    (and (eq_attr "units" "s")
842		 (eq_attr "dest_regfile" "b"))))
843  "s2+x2,nothing*2,s2w")
844
845(define_insn_reservation "mvilc4_s2y" 4
846  (and (eq_attr "type" "mvilc")
847       (and (eq_attr "cross" "y")
848	    (and (eq_attr "units" "s")
849		 (eq_attr "dest_regfile" "b"))))
850  "(s2+s2w)+x2")
851
852(define_insn_reservation "single_dl2y" 1
853  (and (eq_attr "type" "single")
854       (and (eq_attr "cross" "y")
855	    (and (eq_attr "units" "dl")
856		 (eq_attr "dest_regfile" "b"))))
857  "(d2|(l2+l2w))+x2")
858
859(define_insn_reservation "single_ds2y" 1
860  (and (eq_attr "type" "single")
861       (and (eq_attr "cross" "y")
862	    (and (eq_attr "units" "ds")
863		 (eq_attr "dest_regfile" "b"))))
864  "(d2|(s2+s2w))+x2")
865
866(define_insn_reservation "single_ls2y" 1
867  (and (eq_attr "type" "single")
868       (and (eq_attr "cross" "y")
869	    (and (eq_attr "units" "ls")
870		 (eq_attr "dest_regfile" "b"))))
871  "((l2+l2w)|(s2+s2w))+x2")
872
873(define_insn_reservation "dp2_l2y" 2
874  (and (eq_attr "type" "dp2")
875       (and (eq_attr "cross" "y")
876	    (and (eq_attr "units" "l")
877		 (eq_attr "dest_regfile" "b"))))
878  "l2+l2w+x2,l2w")
879
880(define_insn_reservation "fp4_ls2y" 4
881  (and (eq_attr "type" "fp4")
882       (and (eq_attr "cross" "y")
883	    (and (eq_attr "units" "ls")
884		 (eq_attr "dest_regfile" "b"))))
885  "(fps2+s2+x2,nothing*2,s2w)|(fpl2+l2+x2,nothing*2,l2w)")
886
887(define_insn_reservation "adddp_ls2y" 7
888  (and (eq_attr "type" "adddp")
889       (and (eq_attr "cross" "y")
890	    (and (eq_attr "units" "ls")
891		 (eq_attr "dest_regfile" "b"))))
892  "(adddps2+(s2+x2)*2,nothing*3,s2w*2)|(adddpl2+(l2+x2)*2,nothing*3,l2w*2)")
893
894(define_insn_reservation "single_dls2y" 1
895  (and (eq_attr "type" "single")
896       (and (eq_attr "cross" "y")
897	    (and (eq_attr "units" "dls")
898		 (eq_attr "dest_regfile" "b"))))
899  "(d2|(l2+l2w)|(s2+s2w))+x2")
900
901(define_insn_reservation "mpy2_m2y" 2
902  (and (eq_attr "type" "mpy2")
903       (and (eq_attr "cross" "y")
904	    (and (eq_attr "units" "m")
905		 (eq_attr "dest_regfile" "b"))))
906  "m2+x2,m2w")
907
908(define_insn_reservation "mpy4_m2y" 4
909  (and (eq_attr "type" "mpy4")
910       (and (eq_attr "cross" "y")
911	    (and (eq_attr "units" "m")
912		 (eq_attr "dest_regfile" "b"))))
913  "m2+x2,nothing,nothing,m2w")
914
915(define_insn_reservation "mpydp_m2y" 10
916  (and (eq_attr "type" "mpydp")
917       (and (eq_attr "cross" "y")
918	    (and (eq_attr "units" "m")
919		 (eq_attr "dest_regfile" "b"))))
920  "(m2+x2)*4,nothing*4,m2w*2")
921
922(define_insn_reservation "mpyspdp_m2y" 7
923  (and (eq_attr "type" "mpyspdp")
924       (and (eq_attr "cross" "y")
925	    (and (eq_attr "units" "m")
926		 (eq_attr "dest_regfile" "b"))))
927  "(m2+x2)*2,nothing*3,m2w*2")
928
929(define_insn_reservation "mpysp2dp_m2y" 5
930  (and (eq_attr "type" "mpysp2dp")
931       (and (eq_attr "cross" "y")
932	    (and (eq_attr "units" "m")
933		 (eq_attr "dest_regfile" "b"))))
934  "m2+x2,nothing*2,m2w*2")
935