Home | History | Annotate | Line # | Download | only in rs6000
a2.md revision 1.1.1.1
      1  1.1  mrg ;; Scheduling description for PowerPC A2 processors.
      2  1.1  mrg ;; Copyright (C) 2009 Free Software Foundation, Inc.
      3  1.1  mrg ;; Contributed by Ben Elliston (bje (a] au.ibm.com)
      4  1.1  mrg 
      5  1.1  mrg ;; This file is part of GCC.
      6  1.1  mrg 
      7  1.1  mrg ;; GCC is free software; you can redistribute it and/or modify it
      8  1.1  mrg ;; under the terms of the GNU General Public License as published
      9  1.1  mrg ;; by the Free Software Foundation; either version 3, or (at your
     10  1.1  mrg ;; option) any later version.
     11  1.1  mrg 
     12  1.1  mrg ;; GCC is distributed in the hope that it will be useful, but WITHOUT
     13  1.1  mrg ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     14  1.1  mrg ;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
     15  1.1  mrg ;; License for more details.
     16  1.1  mrg 
     17  1.1  mrg ;; You should have received a copy of the GNU General Public License
     18  1.1  mrg ;; along with GCC; see the file COPYING3.  If not see
     19  1.1  mrg ;; <http://www.gnu.org/licenses/>.
     20  1.1  mrg 
     21  1.1  mrg (define_automaton "ppca2")
     22  1.1  mrg 
     23  1.1  mrg ;; CPU units
     24  1.1  mrg 
     25  1.1  mrg ;; The multiplier pipeline.
     26  1.1  mrg (define_cpu_unit "mult" "ppca2")
     27  1.1  mrg 
     28  1.1  mrg ;; The auxillary processor unit (FP/vector unit).
     29  1.1  mrg (define_cpu_unit "axu" "ppca2")
     30  1.1  mrg 
     31  1.1  mrg ;; D.4.6
     32  1.1  mrg ;; Some peculiarities for certain SPRs
     33  1.1  mrg 
     34  1.1  mrg (define_insn_reservation "ppca2-mfcr" 1
     35  1.1  mrg   (and (eq_attr "type" "mfcr")
     36  1.1  mrg        (eq_attr "cpu" "ppca2"))
     37  1.1  mrg    "nothing")
     38  1.1  mrg 
     39  1.1  mrg (define_insn_reservation "ppca2-mfjmpr" 5
     40  1.1  mrg   (and (eq_attr "type" "mfjmpr")
     41  1.1  mrg        (eq_attr "cpu" "ppca2"))
     42  1.1  mrg   "nothing")
     43  1.1  mrg 
     44  1.1  mrg (define_insn_reservation "ppca2-mtjmpr" 5
     45  1.1  mrg   (and (eq_attr "type" "mtjmpr")
     46  1.1  mrg        (eq_attr "cpu" "ppca2"))
     47  1.1  mrg   "nothing")
     48  1.1  mrg 
     49  1.1  mrg ;; D.4.8
     50  1.1  mrg (define_insn_reservation "ppca2-imul" 1
     51  1.1  mrg   (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
     52  1.1  mrg        (eq_attr "cpu" "ppca2"))
     53  1.1  mrg   "nothing")
     54  1.1  mrg 
     55  1.1  mrg ;; FIXME: latency and multiplier reservation for 64-bit multiply?
     56  1.1  mrg (define_insn_reservation "ppca2-lmul" 6
     57  1.1  mrg   (and (eq_attr "type" "lmul,lmul_compare")
     58  1.1  mrg        (eq_attr "cpu" "ppca2"))
     59  1.1  mrg   "mult*3")
     60  1.1  mrg 
     61  1.1  mrg ;; D.4.9
     62  1.1  mrg (define_insn_reservation "ppca2-idiv" 32
     63  1.1  mrg   (and (eq_attr "type" "idiv")
     64  1.1  mrg        (eq_attr "cpu" "ppca2"))
     65  1.1  mrg   "mult*32")
     66  1.1  mrg 
     67  1.1  mrg (define_insn_reservation "ppca2-ldiv" 65
     68  1.1  mrg   (and (eq_attr "type" "ldiv")
     69  1.1  mrg        (eq_attr "cpu" "ppca2"))
     70  1.1  mrg   "mult*65")
     71  1.1  mrg 
     72  1.1  mrg ;; D.4.13
     73  1.1  mrg (define_insn_reservation "ppca2-load" 5
     74  1.1  mrg   (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
     75  1.1  mrg        (eq_attr "cpu" "ppca2"))
     76  1.1  mrg   "nothing")
     77  1.1  mrg 
     78  1.1  mrg ;; D.8.1
     79  1.1  mrg (define_insn_reservation "ppca2-fp" 6
     80  1.1  mrg   (and (eq_attr "type" "fp")     	   ;; Ignore fpsimple insn types (SPE only).
     81  1.1  mrg        (eq_attr "cpu" "ppca2"))
     82  1.1  mrg   "axu")
     83  1.1  mrg 
     84  1.1  mrg ;; D.8.4
     85  1.1  mrg (define_insn_reservation "ppca2-fp-load" 6
     86  1.1  mrg   (and (eq_attr "type" "fpload,fpload_u,fpload_ux")
     87  1.1  mrg        (eq_attr "cpu" "ppca2"))
     88  1.1  mrg   "axu")
     89  1.1  mrg 
     90  1.1  mrg ;; D.8.5
     91  1.1  mrg (define_insn_reservation "ppca2-fp-store" 2
     92  1.1  mrg   (and (eq_attr "type" "fpstore,fpstore_u,fpstore_ux")
     93  1.1  mrg        (eq_attr "cpu" "ppca2"))
     94  1.1  mrg   "axu")
     95  1.1  mrg 
     96  1.1  mrg ;; D.8.6
     97  1.1  mrg (define_insn_reservation "ppca2-fpcompare" 5
     98  1.1  mrg   (and (eq_attr "type" "fpcompare")
     99  1.1  mrg        (eq_attr "cpu" "ppca2"))
    100  1.1  mrg  "axu")
    101  1.1  mrg 
    102  1.1  mrg ;; D.8.7
    103  1.1  mrg ;;
    104  1.1  mrg ;; Instructions from the same thread succeeding the floating-point
    105  1.1  mrg ;; divide cannot be executed until the floating-point divide has
    106  1.1  mrg ;; completed.  Since there is nothing else we can do, this thread will
    107  1.1  mrg ;; just have to stall.
    108  1.1  mrg 
    109  1.1  mrg (define_insn_reservation "ppca2-ddiv" 72
    110  1.1  mrg   (and (eq_attr "type" "ddiv")
    111  1.1  mrg        (eq_attr "cpu" "ppca2"))
    112  1.1  mrg    "axu")
    113  1.1  mrg 
    114  1.1  mrg (define_insn_reservation "ppca2-sdiv" 59
    115  1.1  mrg   (and (eq_attr "type" "sdiv")
    116  1.1  mrg        (eq_attr "cpu" "ppca2"))
    117  1.1  mrg    "axu")
    118  1.1  mrg 
    119  1.1  mrg ;; D.8.8
    120  1.1  mrg ;; 
    121  1.1  mrg ;; Instructions from the same thread succeeding the floating-point
    122  1.1  mrg ;; divide cannot be executed until the floating-point divide has
    123  1.1  mrg ;; completed.  Since there is nothing else we can do, this thread will
    124  1.1  mrg ;; just have to stall.
    125  1.1  mrg 
    126  1.1  mrg (define_insn_reservation "ppca2-dsqrt" 69
    127  1.1  mrg   (and (eq_attr "type" "dsqrt")
    128  1.1  mrg        (eq_attr "cpu" "ppca2"))
    129  1.1  mrg   "axu")
    130  1.1  mrg 
    131  1.1  mrg (define_insn_reservation "ppca2-ssqrt" 65
    132  1.1  mrg   (and (eq_attr "type" "ssqrt")
    133  1.1  mrg        (eq_attr "cpu" "ppca2"))
    134  1.1  mrg   "axu")
    135