7450.md revision 169689
159024Sobrien;; Scheduling description for Motorola PowerPC 7450 processor. 277298Sobrien;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. 377298Sobrien;; 459024Sobrien;; This file is part of GCC. 559024Sobrien 659024Sobrien;; GCC is free software; you can redistribute it and/or modify it 759024Sobrien;; under the terms of the GNU General Public License as published 859024Sobrien;; by the Free Software Foundation; either version 2, or (at your 959024Sobrien;; option) any later version. 1059024Sobrien 1159024Sobrien;; GCC is distributed in the hope that it will be useful, but WITHOUT 1259024Sobrien;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1359024Sobrien;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 1459024Sobrien;; License for more details. 1559024Sobrien 1659024Sobrien;; You should have received a copy of the GNU General Public License 1759024Sobrien;; along with GCC; see the file COPYING. If not, write to the 1859024Sobrien;; Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 1977298Sobrien;; MA 02110-1301, USA. 2059024Sobrien 2159024Sobrien(define_automaton "ppc7450,ppc7450mciu,ppc7450fp,ppc7450vec") 2259024Sobrien(define_cpu_unit "iu1_7450,iu2_7450,iu3_7450" "ppc7450") 2359024Sobrien(define_cpu_unit "mciu_7450" "ppc7450mciu") 2459024Sobrien(define_cpu_unit "fpu_7450" "ppc7450fp") 2559024Sobrien(define_cpu_unit "lsu_7450,bpu_7450" "ppc7450") 2659024Sobrien(define_cpu_unit "du1_7450,du2_7450,du3_7450" "ppc7450") 2759024Sobrien(define_cpu_unit "vecsmpl_7450,veccmplx_7450,vecflt_7450,vecperm_7450" "ppc7450vec") 2859024Sobrien(define_cpu_unit "vdu1_7450,vdu2_7450" "ppc7450vec") 2959024Sobrien 3059024Sobrien 3177298Sobrien;; PPC7450 32-bit 3xIU, MCIU, LSU, SRU, FPU, BPU, 4xVEC 3259024Sobrien;; IU1,IU2,IU3 can perform all integer operations 3359024Sobrien;; MCIU performs imul and idiv, cr logical, SPR moves 3459024Sobrien;; LSU 2 stage pipelined 3559024Sobrien;; FPU 3 stage pipelined 3660484Sobrien;; It also has 4 vector units, one for each type of vector instruction. 3759024Sobrien;; However, we can only dispatch 2 instructions per cycle. 3859024Sobrien;; Max issue 3 insns/clock cycle (includes 1 branch) 3959024Sobrien;; In-order execution 4059024Sobrien 4160484Sobrien;; Branches go straight to the BPU. All other insns are handled 4260484Sobrien;; by a dispatch unit which can issue a max of 3 insns per cycle. 4360484Sobrien(define_reservation "ppc7450_du" "du1_7450|du2_7450|du3_7450") 4459024Sobrien(define_reservation "ppc7450_vec_du" "vdu1_7450|vdu2_7450") 4559024Sobrien 4659024Sobrien(define_insn_reservation "ppc7450-load" 3 4759024Sobrien (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,\ 4859024Sobrien load_ux,load_u,vecload") 4959024Sobrien (eq_attr "cpu" "ppc7450")) 5059024Sobrien "ppc7450_du,lsu_7450") 5159024Sobrien 5259024Sobrien(define_insn_reservation "ppc7450-store" 3 5359024Sobrien (and (eq_attr "type" "store,store_ux,store_u,vecstore") 5459024Sobrien (eq_attr "cpu" "ppc7450")) 5559024Sobrien "ppc7450_du,lsu_7450") 5659024Sobrien 5759024Sobrien(define_insn_reservation "ppc7450-fpload" 4 5859024Sobrien (and (eq_attr "type" "fpload,fpload_ux,fpload_u") 5959024Sobrien (eq_attr "cpu" "ppc7450")) 6059024Sobrien "ppc7450_du,lsu_7450") 6159024Sobrien 6259024Sobrien(define_insn_reservation "ppc7450-fpstore" 3 6359024Sobrien (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u") 6459024Sobrien (eq_attr "cpu" "ppc7450")) 6559024Sobrien "ppc7450_du,lsu_7450*3") 6659024Sobrien 6759024Sobrien(define_insn_reservation "ppc7450-llsc" 3 6859024Sobrien (and (eq_attr "type" "load_l,store_c") 6959024Sobrien (eq_attr "cpu" "ppc7450")) 7059024Sobrien "ppc7450_du,lsu_7450") 7159024Sobrien 7259024Sobrien(define_insn_reservation "ppc7450-sync" 35 7359024Sobrien (and (eq_attr "type" "sync") 7459024Sobrien (eq_attr "cpu" "ppc7450")) 7559024Sobrien "ppc7450_du,lsu_7450") 7659024Sobrien 7759024Sobrien(define_insn_reservation "ppc7450-integer" 1 7859024Sobrien (and (eq_attr "type" "integer,insert_word") 7959024Sobrien (eq_attr "cpu" "ppc7450")) 8059024Sobrien "ppc7450_du,iu1_7450|iu2_7450|iu3_7450") 8159024Sobrien 8259024Sobrien(define_insn_reservation "ppc7450-two" 1 8359024Sobrien (and (eq_attr "type" "two") 8459024Sobrien (eq_attr "cpu" "ppc7450")) 8559024Sobrien "ppc7450_du,iu1_7450|iu2_7450|iu3_7450,iu1_7450|iu2_7450|iu3_7450") 8659024Sobrien 8759024Sobrien(define_insn_reservation "ppc7450-three" 1 8859024Sobrien (and (eq_attr "type" "three") 8959024Sobrien (eq_attr "cpu" "ppc7450")) 9059024Sobrien "ppc7450_du,iu1_7450|iu2_7450|iu3_7450,\ 9159024Sobrien iu1_7450|iu2_7450|iu3_7450,iu1_7450|iu2_7450|iu3_7450") 9260484Sobrien 9360484Sobrien(define_insn_reservation "ppc7450-imul" 4 9460484Sobrien (and (eq_attr "type" "imul,imul_compare") 9560484Sobrien (eq_attr "cpu" "ppc7450")) 9677298Sobrien "ppc7450_du,mciu_7450*2") 9777298Sobrien 9877298Sobrien(define_insn_reservation "ppc7450-imul2" 3 9959024Sobrien (and (eq_attr "type" "imul2,imul3") 10059024Sobrien (eq_attr "cpu" "ppc7450")) 10159024Sobrien "ppc7450_du,mciu_7450") 10259024Sobrien 10359024Sobrien(define_insn_reservation "ppc7450-idiv" 23 10459024Sobrien (and (eq_attr "type" "idiv") 10559024Sobrien (eq_attr "cpu" "ppc7450")) 10659024Sobrien "ppc7450_du,mciu_7450*23") 10760484Sobrien 10860484Sobrien(define_insn_reservation "ppc7450-compare" 2 10960484Sobrien (and (eq_attr "type" "cmp,fast_compare,compare,delayed_compare") 11060484Sobrien (eq_attr "cpu" "ppc7450")) 11160484Sobrien "ppc7450_du,(iu1_7450|iu2_7450|iu3_7450)") 11260484Sobrien 11360484Sobrien(define_insn_reservation "ppc7450-fpcompare" 5 11460484Sobrien (and (eq_attr "type" "fpcompare") 11560484Sobrien (eq_attr "cpu" "ppc7450")) 11660484Sobrien "ppc7450_du,fpu_7450") 11759024Sobrien 11860484Sobrien(define_insn_reservation "ppc7450-fp" 5 11959024Sobrien (and (eq_attr "type" "fp,dmul") 12060484Sobrien (eq_attr "cpu" "ppc7450")) 12159024Sobrien "ppc7450_du,fpu_7450") 12277298Sobrien 12359024Sobrien; Divides are not pipelined 12459024Sobrien(define_insn_reservation "ppc7450-sdiv" 21 12560484Sobrien (and (eq_attr "type" "sdiv") 12659024Sobrien (eq_attr "cpu" "ppc7450")) 12759024Sobrien "ppc7450_du,fpu_7450*21") 12859024Sobrien 12959024Sobrien(define_insn_reservation "ppc7450-ddiv" 35 13059024Sobrien (and (eq_attr "type" "ddiv") 13159024Sobrien (eq_attr "cpu" "ppc7450")) 13259024Sobrien "ppc7450_du,fpu_7450*35") 13360484Sobrien 13460484Sobrien(define_insn_reservation "ppc7450-mfcr" 2 13559024Sobrien (and (eq_attr "type" "mfcr,mtcr") 13659024Sobrien (eq_attr "cpu" "ppc7450")) 13759024Sobrien "ppc7450_du,mciu_7450") 13877298Sobrien 13959024Sobrien(define_insn_reservation "ppc7450-crlogical" 1 14059024Sobrien (and (eq_attr "type" "cr_logical,delayed_cr") 14159024Sobrien (eq_attr "cpu" "ppc7450")) 14259024Sobrien "ppc7450_du,mciu_7450") 14360484Sobrien 14459024Sobrien(define_insn_reservation "ppc7450-mtjmpr" 2 14559024Sobrien (and (eq_attr "type" "mtjmpr") 14659024Sobrien (eq_attr "cpu" "ppc7450")) 14759024Sobrien "nothing,mciu_7450*2") 14859024Sobrien 14959024Sobrien(define_insn_reservation "ppc7450-mfjmpr" 3 15059024Sobrien (and (eq_attr "type" "mfjmpr") 15159024Sobrien (eq_attr "cpu" "ppc7450")) 15259024Sobrien "nothing,mciu_7450*2") 15359024Sobrien 15459024Sobrien(define_insn_reservation "ppc7450-jmpreg" 1 15577298Sobrien (and (eq_attr "type" "jmpreg,branch,isync") 15677298Sobrien (eq_attr "cpu" "ppc7450")) 15777298Sobrien "nothing,bpu_7450") 15859024Sobrien 15959024Sobrien;; Altivec 16059024Sobrien(define_insn_reservation "ppc7450-vecsimple" 1 16160484Sobrien (and (eq_attr "type" "vecsimple") 16259024Sobrien (eq_attr "cpu" "ppc7450")) 16359024Sobrien "ppc7450_du,ppc7450_vec_du,vecsmpl_7450") 16459024Sobrien 16559024Sobrien(define_insn_reservation "ppc7450-veccomplex" 4 16677298Sobrien (and (eq_attr "type" "veccomplex") 16777298Sobrien (eq_attr "cpu" "ppc7450")) 16859024Sobrien "ppc7450_du,ppc7450_vec_du,veccmplx_7450") 16959024Sobrien 17077298Sobrien(define_insn_reservation "ppc7450-veccmp" 2 17177298Sobrien (and (eq_attr "type" "veccmp") 17277298Sobrien (eq_attr "cpu" "ppc7450")) 17359024Sobrien "ppc7450_du,ppc7450_vec_du,veccmplx_7450") 17459024Sobrien 17559024Sobrien(define_insn_reservation "ppc7450-vecfloat" 4 17677298Sobrien (and (eq_attr "type" "vecfloat") 17759024Sobrien (eq_attr "cpu" "ppc7450")) 17859024Sobrien "ppc7450_du,ppc7450_vec_du,vecflt_7450") 17977298Sobrien 18059024Sobrien(define_insn_reservation "ppc7450-vecperm" 2 18177298Sobrien (and (eq_attr "type" "vecperm") 18259024Sobrien (eq_attr "cpu" "ppc7450")) 18359024Sobrien "ppc7450_du,ppc7450_vec_du,vecperm_7450") 18477298Sobrien 18559024Sobrien