Home | History | Annotate | Line # | Download | only in csky
      1 ;; Scheduler information for C-SKY CK801 processors.
      2 ;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
      3 ;; Contributed by C-SKY Microsystems and Mentor Graphics.
      4 ;;
      5 ;; This file is part of GCC.
      6 ;;
      7 ;; GCC is free software; you can redistribute it and/or modify it
      8 ;; under the terms of the GNU General Public License as published by
      9 ;; the Free Software Foundation; either version 3, or (at your option)
     10 ;; any later version.
     11 ;;
     12 ;; GCC is distributed in the hope that it will be useful, but
     13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
     14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15 ;; General Public License for more details.
     16 ;;
     17 ;; You should have received a copy of the GNU General Public License
     18 ;; along with GCC; see the file COPYING3.  If not see
     19 ;; <http://www.gnu.org/licenses/>.  */
     20 
     21 ;; This is just a placeholder for a more accurate pipeline
     22 ;; description for CK801.
     23 
     24 (define_automaton "ck801")
     25 
     26 (define_cpu_unit "ck801_ex1" "ck801")
     27 (define_cpu_unit "ck801_exit" "ck801")
     28 
     29 (define_insn_reservation "ck801_generic" 1
     30   (and (match_test "CSKY_TARGET_ARCH (CK801)")
     31        (eq_attr "type" "alu,cmp,branch,cbranch,addsub,alu_ix,branch_jmp,call_jsr,call"))
     32   "ck801_ex1+ck801_exit")
     33 
     34 (define_insn_reservation "ck801_load" 1
     35   (and (match_test "CSKY_TARGET_ARCH (CK801)")
     36        (and (eq_attr "type" "load")
     37 	    (match_test "!csky_minipool_load_p (insn)")))
     38   "ck801_ex1+ck801_exit")
     39 
     40 (define_insn_reservation "ck801_pool" 1
     41   (and (match_test "CSKY_TARGET_ARCH (CK801)")
     42        (and (eq_attr "type" "load")
     43 	    (match_test "csky_minipool_load_p (insn)")))
     44   "ck801_ex1+ck801_exit")
     45 
     46 (define_insn_reservation "ck801_store" 1
     47   (and (match_test "CSKY_TARGET_ARCH (CK801)")
     48        (eq_attr "type" "store"))
     49   "ck801_ex1+ck801_exit")
     50 
     51 ;; Switching between constant pool loads and loads/stores in the data section
     52 ;; carries an extra penalty.
     53 (define_bypass 2 "ck801_load,ck801_store" "ck801_pool")
     54 (define_bypass 2 "ck801_pool" "ck801_load,ck801_store")
     55