Home | History | Annotate | Line # | Download | only in c6x
c6x-sched.md.in revision 1.9
      1  1.1  mrg ;; Scheduling description for TI C6X.
      2  1.9  mrg ;; Copyright (C) 2010-2020 Free Software Foundation, Inc.
      3  1.1  mrg ;; Contributed by Bernd Schmidt <bernds (a] codesourcery.com>
      4  1.1  mrg ;; Contributed by CodeSourcery.
      5  1.1  mrg ;;
      6  1.1  mrg ;; This file is part of GCC.
      7  1.1  mrg ;;
      8  1.1  mrg ;; GCC is free software; you can redistribute it and/or modify
      9  1.1  mrg ;; it under the terms of the GNU General Public License as published by
     10  1.1  mrg ;; the Free Software Foundation; either version 3, or (at your option)
     11  1.1  mrg ;; any later version.
     12  1.1  mrg ;;
     13  1.1  mrg ;; GCC is distributed in the hope that it will be useful,
     14  1.1  mrg ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
     15  1.1  mrg ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16  1.1  mrg ;; GNU General Public License for more details.
     17  1.1  mrg ;;
     18  1.1  mrg ;; You should have received a copy of the GNU General Public License
     19  1.1  mrg ;; along with GCC; see the file COPYING3.  If not see
     20  1.1  mrg ;; <http://www.gnu.org/licenses/>.
     21  1.1  mrg 
     22  1.1  mrg ;; Input file for gensched.sh We process this file multiple times,
     23  1.1  mrg ;; replacing _N_ with either 1 or 2 for each of the sides of the
     24  1.1  mrg ;; machine, and _RF_ correspondingly with "a" or "b".  _CROSS_ and
     25  1.1  mrg ;; _CUNIT_ are replaced with yes/no and the appropriate reservation.
     26  1.1  mrg 
     27  1.1  mrg (define_insn_reservation "load_d_N__CROSS_" 5
     28  1.1  mrg   (and (eq_attr "type" "load")
     29  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     30  1.1  mrg 	    (and (eq_attr "units" "d_addr")
     31  1.1  mrg 		 (eq_attr "addr_regfile" "_RF_"))))
     32  1.1  mrg   "d_N_+t_NX_")
     33  1.1  mrg 
     34  1.1  mrg (define_insn_reservation "store_d_N__CROSS_" 1
     35  1.1  mrg   (and (eq_attr "type" "store")
     36  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     37  1.1  mrg 	    (and (eq_attr "units" "d_addr")
     38  1.1  mrg 		 (eq_attr "addr_regfile" "_RF_"))))
     39  1.1  mrg   "d_N_+t_NX_")
     40  1.1  mrg 
     41  1.1  mrg (define_insn_reservation "loadn_d_N__CROSS_" 5
     42  1.1  mrg   (and (eq_attr "type" "loadn")
     43  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     44  1.1  mrg 	    (and (eq_attr "units" "d_addr")
     45  1.1  mrg 		 (eq_attr "addr_regfile" "_RF_"))))
     46  1.1  mrg   "d_N_+t1+t2")
     47  1.1  mrg 
     48  1.1  mrg (define_insn_reservation "storen_d_N__CROSS_" 1
     49  1.1  mrg   (and (eq_attr "type" "storen")
     50  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     51  1.1  mrg 	    (and (eq_attr "units" "d_addr")
     52  1.1  mrg 		 (eq_attr "addr_regfile" "_RF_"))))
     53  1.1  mrg   "d_N_+t1+t2")
     54  1.1  mrg 
     55  1.1  mrg (define_insn_reservation "single_d_N__CROSS_" 1
     56  1.1  mrg   (and (eq_attr "type" "single")
     57  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     58  1.1  mrg 	    (and (eq_attr "units" "d")
     59  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
     60  1.1  mrg   "d_N__CUNIT_")
     61  1.1  mrg 
     62  1.1  mrg (define_insn_reservation "single_l_N__CROSS_" 1
     63  1.1  mrg   (and (eq_attr "type" "single")
     64  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     65  1.1  mrg 	    (and (eq_attr "units" "l")
     66  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
     67  1.1  mrg   "l_N_+l_N_w_CUNIT_")
     68  1.1  mrg 
     69  1.1  mrg (define_insn_reservation "fp4_l_N__CROSS_" 4
     70  1.1  mrg   (and (eq_attr "type" "fp4")
     71  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     72  1.1  mrg 	    (and (eq_attr "units" "l")
     73  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
     74  1.1  mrg   "l_N__CUNIT_,nothing*2,l_N_w")
     75  1.1  mrg 
     76  1.1  mrg (define_insn_reservation "intdp_l_N__CROSS_" 5
     77  1.1  mrg   (and (eq_attr "type" "intdp")
     78  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     79  1.1  mrg 	    (and (eq_attr "units" "l")
     80  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
     81  1.1  mrg   "l_N__CUNIT_,nothing*2,l_N_w*2")
     82  1.1  mrg 
     83  1.1  mrg (define_insn_reservation "adddp_l_N__CROSS_" 7
     84  1.1  mrg   (and (eq_attr "type" "adddp")
     85  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     86  1.1  mrg 	    (and (eq_attr "units" "l")
     87  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
     88  1.1  mrg   "(l_N__CUNIT_)*2,nothing*3,l_N_w*2")
     89  1.1  mrg 
     90  1.1  mrg (define_insn_reservation "branch_s_N__CROSS_" 6
     91  1.1  mrg   (and (eq_attr "type" "branch")
     92  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
     93  1.1  mrg 	    (and (eq_attr "units" "s")
     94  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
     95  1.1  mrg   "(s_N_+s_N_w)_CUNIT_+br1")
     96  1.1  mrg 
     97  1.1  mrg (define_insn_reservation "call_addkpc_s_N__CROSS_" 6
     98  1.1  mrg   (and (eq_attr "type" "call")
     99  1.1  mrg        (and (ne (symbol_ref "TARGET_INSNS_64") (const_int 0))
    100  1.1  mrg 	    (and (eq_attr "cross" "_CROSS_")
    101  1.1  mrg 		 (and (eq_attr "units" "s")
    102  1.1  mrg 		      (eq_attr "dest_regfile" "_RF_")))))
    103  1.1  mrg   "(s_N_+s_N_w)_CUNIT_+br1,s2+br0+br1")
    104  1.1  mrg 
    105  1.1  mrg (define_insn_reservation "call_mvk_s_N__CROSS_" 6
    106  1.1  mrg   (and (eq_attr "type" "call")
    107  1.1  mrg        (and (eq (symbol_ref "TARGET_INSNS_64") (const_int 0))
    108  1.1  mrg 	    (and (eq_attr "cross" "_CROSS_")
    109  1.1  mrg 		 (and (eq_attr "units" "s")
    110  1.1  mrg 		      (eq_attr "dest_regfile" "_RF_")))))
    111  1.1  mrg   "(s_N_+s_N_w)_CUNIT_+br1,s2,s2")
    112  1.1  mrg 
    113  1.1  mrg (define_insn_reservation "single_s_N__CROSS_" 1
    114  1.1  mrg   (and (eq_attr "type" "single")
    115  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    116  1.1  mrg 	    (and (eq_attr "units" "s")
    117  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    118  1.1  mrg   "(s_N_+s_N_w)_CUNIT_")
    119  1.1  mrg 
    120  1.1  mrg (define_insn_reservation "cmpdp_s_N__CROSS_" 2
    121  1.1  mrg   (and (eq_attr "type" "cmpdp")
    122  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    123  1.1  mrg 	    (and (eq_attr "units" "s")
    124  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    125  1.1  mrg   "s_N__CUNIT_,(s_N__CUNIT_)+s_N_w")
    126  1.1  mrg 
    127  1.1  mrg (define_insn_reservation "dp2_s_N__CROSS_" 2
    128  1.1  mrg   (and (eq_attr "type" "dp2")
    129  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    130  1.1  mrg 	    (and (eq_attr "units" "s")
    131  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    132  1.1  mrg   "s_N_+s_N_w_CUNIT_,s_N_w")
    133  1.1  mrg 
    134  1.1  mrg (define_insn_reservation "fp4_s_N__CROSS_" 4
    135  1.1  mrg   (and (eq_attr "type" "fp4")
    136  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    137  1.1  mrg 	    (and (eq_attr "units" "s")
    138  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    139  1.1  mrg   "s_N__CUNIT_,nothing*2,s_N_w")
    140  1.1  mrg 
    141  1.1  mrg (define_insn_reservation "mvilc4_s_N__CROSS_" 4
    142  1.1  mrg   (and (eq_attr "type" "mvilc")
    143  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    144  1.1  mrg 	    (and (eq_attr "units" "s")
    145  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    146  1.1  mrg   "(s_N_+s_N_w)_CUNIT_")
    147  1.1  mrg 
    148  1.1  mrg (define_insn_reservation "single_dl_N__CROSS_" 1
    149  1.1  mrg   (and (eq_attr "type" "single")
    150  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    151  1.1  mrg 	    (and (eq_attr "units" "dl")
    152  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    153  1.1  mrg   "(d_N_|(l_N_+l_N_w))_CUNIT_")
    154  1.1  mrg 
    155  1.1  mrg (define_insn_reservation "single_ds_N__CROSS_" 1
    156  1.1  mrg   (and (eq_attr "type" "single")
    157  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    158  1.1  mrg 	    (and (eq_attr "units" "ds")
    159  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    160  1.1  mrg   "(d_N_|(s_N_+s_N_w))_CUNIT_")
    161  1.1  mrg 
    162  1.1  mrg (define_insn_reservation "single_ls_N__CROSS_" 1
    163  1.1  mrg   (and (eq_attr "type" "single")
    164  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    165  1.1  mrg 	    (and (eq_attr "units" "ls")
    166  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    167  1.1  mrg   "((l_N_+l_N_w)|(s_N_+s_N_w))_CUNIT_")
    168  1.1  mrg 
    169  1.1  mrg (define_insn_reservation "dp2_l_N__CROSS_" 2
    170  1.1  mrg   (and (eq_attr "type" "dp2")
    171  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    172  1.1  mrg 	    (and (eq_attr "units" "l")
    173  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    174  1.1  mrg   "l_N_+l_N_w_CUNIT_,l_N_w")
    175  1.1  mrg 
    176  1.1  mrg (define_insn_reservation "fp4_ls_N__CROSS_" 4
    177  1.1  mrg   (and (eq_attr "type" "fp4")
    178  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    179  1.1  mrg 	    (and (eq_attr "units" "ls")
    180  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    181  1.1  mrg   "(fps_N_+s_N__CUNIT_,nothing*2,s_N_w)|(fpl_N_+l_N__CUNIT_,nothing*2,l_N_w)")
    182  1.1  mrg 
    183  1.1  mrg (define_insn_reservation "adddp_ls_N__CROSS_" 7
    184  1.1  mrg   (and (eq_attr "type" "adddp")
    185  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    186  1.1  mrg 	    (and (eq_attr "units" "ls")
    187  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    188  1.1  mrg   "(adddps_N_+(s_N__CUNIT_)*2,nothing*3,s_N_w*2)|(adddpl_N_+(l_N__CUNIT_)*2,nothing*3,l_N_w*2)")
    189  1.1  mrg 
    190  1.1  mrg (define_insn_reservation "single_dls_N__CROSS_" 1
    191  1.1  mrg   (and (eq_attr "type" "single")
    192  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    193  1.1  mrg 	    (and (eq_attr "units" "dls")
    194  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    195  1.1  mrg   "(d_N_|(l_N_+l_N_w)|(s_N_+s_N_w))_CUNIT_")
    196  1.1  mrg 
    197  1.1  mrg (define_insn_reservation "mpy2_m_N__CROSS_" 2
    198  1.1  mrg   (and (eq_attr "type" "mpy2")
    199  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    200  1.1  mrg 	    (and (eq_attr "units" "m")
    201  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    202  1.1  mrg   "m_N__CUNIT_,m_N_w")
    203  1.1  mrg 
    204  1.1  mrg (define_insn_reservation "mpy4_m_N__CROSS_" 4
    205  1.1  mrg   (and (eq_attr "type" "mpy4")
    206  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    207  1.1  mrg 	    (and (eq_attr "units" "m")
    208  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    209  1.1  mrg   "m_N__CUNIT_,nothing,nothing,m_N_w")
    210  1.1  mrg 
    211  1.1  mrg (define_insn_reservation "mpydp_m_N__CROSS_" 10
    212  1.1  mrg   (and (eq_attr "type" "mpydp")
    213  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    214  1.1  mrg 	    (and (eq_attr "units" "m")
    215  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    216  1.1  mrg   "(m_N__CUNIT_)*4,nothing*4,m_N_w*2")
    217  1.1  mrg 
    218  1.1  mrg (define_insn_reservation "mpyspdp_m_N__CROSS_" 7
    219  1.1  mrg   (and (eq_attr "type" "mpyspdp")
    220  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    221  1.1  mrg 	    (and (eq_attr "units" "m")
    222  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    223  1.1  mrg   "(m_N__CUNIT_)*2,nothing*3,m_N_w*2")
    224  1.1  mrg 
    225  1.1  mrg (define_insn_reservation "mpysp2dp_m_N__CROSS_" 5
    226  1.1  mrg   (and (eq_attr "type" "mpysp2dp")
    227  1.1  mrg        (and (eq_attr "cross" "_CROSS_")
    228  1.1  mrg 	    (and (eq_attr "units" "m")
    229  1.1  mrg 		 (eq_attr "dest_regfile" "_RF_"))))
    230  1.1  mrg   "m_N__CUNIT_,nothing*2,m_N_w*2")
    231