athlon.md revision 251212
1117395Skan;; AMD Athlon Scheduling 2117395Skan;; 3117395Skan;; The Athlon does contain three pipelined FP units, three integer units and 4117395Skan;; three address generation units. 5117395Skan;; 6117395Skan;; The predecode logic is determining boundaries of instructions in the 64 7117395Skan;; byte cache line. So the cache line straddling problem of K6 might be issue 8117395Skan;; here as well, but it is not noted in the documentation. 9117395Skan;; 10117395Skan;; Three DirectPath instructions decoders and only one VectorPath decoder 11117395Skan;; is available. They can decode three DirectPath instructions or one VectorPath 12117395Skan;; instruction per cycle. 13117395Skan;; Decoded macro instructions are then passed to 72 entry instruction control 14117395Skan;; unit, that passes 15117395Skan;; it to the specialized integer (18 entry) and fp (36 entry) schedulers. 16117395Skan;; 17117395Skan;; The load/store queue unit is not attached to the schedulers but 18117395Skan;; communicates with all the execution units separately instead. 19117395Skan 20132718Skan(define_attr "athlon_decode" "direct,vector,double" 21132718Skan (cond [(eq_attr "type" "call,imul,idiv,other,multi,fcmov,fpspc,str,pop,cld,leave") 22132718Skan (const_string "vector") 23132718Skan (and (eq_attr "type" "push") 24132718Skan (match_operand 1 "memory_operand" "")) 25132718Skan (const_string "vector") 26132718Skan (and (eq_attr "type" "fmov") 27132718Skan (and (eq_attr "memory" "load,store") 28132718Skan (eq_attr "mode" "XF"))) 29132718Skan (const_string "vector")] 30132718Skan (const_string "direct"))) 31117395Skan 32251212Spfg(define_attr "amdfam10_decode" "direct,vector,double" 33251212Spfg (const_string "direct")) 34132718Skan;; 35132718Skan;; decode0 decode1 decode2 36132718Skan;; \ | / 37132718Skan;; instruction control unit (72 entry scheduler) 38132718Skan;; | | 39132718Skan;; integer scheduler (18) stack map 40132718Skan;; / | | | | \ stack rename 41132718Skan;; ieu0 agu0 ieu1 agu1 ieu2 agu2 scheduler 42132718Skan;; | agu0 | agu1 agu2 register file 43132718Skan;; | \ | | / | | | 44132718Skan;; \ /\ | / fadd fmul fstore 45132718Skan;; \ / \ | / fadd fmul fstore 46132718Skan;; imul load/store (2x) fadd fmul fstore 47117395Skan 48132718Skan(define_automaton "athlon,athlon_load,athlon_mult,athlon_fp") 49132718Skan(define_cpu_unit "athlon-decode0" "athlon") 50132718Skan(define_cpu_unit "athlon-decode1" "athlon") 51132718Skan(define_cpu_unit "athlon-decode2" "athlon") 52132718Skan(define_cpu_unit "athlon-decodev" "athlon") 53132718Skan;; Model the fact that double decoded instruction may take 2 cycles 54132718Skan;; to decode when decoder2 and decoder0 in next cycle 55132718Skan;; is used (this is needed to allow troughput of 1.5 double decoded 56132718Skan;; instructions per cycle). 57132718Skan;; 58132718Skan;; In order to avoid dependence between reservation of decoder 59132718Skan;; and other units, we model decoder as two stage fully pipelined unit 60132718Skan;; and only double decoded instruction may occupy unit in the first cycle. 61132718Skan;; With this scheme however two double instructions can be issued cycle0. 62132718Skan;; 63132718Skan;; Avoid this by using presence set requiring decoder0 to be allocated 64132718Skan;; too. Vector decoded instructions then can't be issued when 65132718Skan;; modeled as consuming decoder0+decoder1+decoder2. 66132718Skan;; We solve that by specialized vector decoder unit and exclusion set. 67132718Skan(presence_set "athlon-decode2" "athlon-decode0") 68132718Skan(exclusion_set "athlon-decodev" "athlon-decode0,athlon-decode1,athlon-decode2") 69132718Skan(define_reservation "athlon-vector" "nothing,athlon-decodev") 70132718Skan(define_reservation "athlon-direct0" "nothing,athlon-decode0") 71132718Skan(define_reservation "athlon-direct" "nothing, 72132718Skan (athlon-decode0 | athlon-decode1 73132718Skan | athlon-decode2)") 74132718Skan;; Double instructions behaves like two direct instructions. 75132718Skan(define_reservation "athlon-double" "((athlon-decode2, athlon-decode0) 76132718Skan | (nothing,(athlon-decode0 + athlon-decode1)) 77132718Skan | (nothing,(athlon-decode1 + athlon-decode2)))") 78117395Skan 79132718Skan;; Agu and ieu unit results in extremely large automatons and 80132718Skan;; in our approximation they are hardly filled in. Only ieu 81132718Skan;; unit can, as issue rate is 3 and agu unit is always used 82132718Skan;; first in the insn reservations. Skip the models. 83117395Skan 84132718Skan;(define_cpu_unit "athlon-ieu0" "athlon_ieu") 85132718Skan;(define_cpu_unit "athlon-ieu1" "athlon_ieu") 86132718Skan;(define_cpu_unit "athlon-ieu2" "athlon_ieu") 87132718Skan;(define_reservation "athlon-ieu" "(athlon-ieu0 | athlon-ieu1 | athlon-ieu2)") 88132718Skan(define_reservation "athlon-ieu" "nothing") 89132718Skan(define_cpu_unit "athlon-ieu0" "athlon") 90132718Skan;(define_cpu_unit "athlon-agu0" "athlon_agu") 91132718Skan;(define_cpu_unit "athlon-agu1" "athlon_agu") 92132718Skan;(define_cpu_unit "athlon-agu2" "athlon_agu") 93132718Skan;(define_reservation "athlon-agu" "(athlon-agu0 | athlon-agu1 | athlon-agu2)") 94132718Skan(define_reservation "athlon-agu" "nothing") 95117395Skan 96132718Skan(define_cpu_unit "athlon-mult" "athlon_mult") 97117395Skan 98132718Skan(define_cpu_unit "athlon-load0" "athlon_load") 99132718Skan(define_cpu_unit "athlon-load1" "athlon_load") 100132718Skan(define_reservation "athlon-load" "athlon-agu, 101132718Skan (athlon-load0 | athlon-load1),nothing") 102132718Skan;; 128bit SSE instructions issue two loads at once 103132718Skan(define_reservation "athlon-load2" "athlon-agu, 104132718Skan (athlon-load0 + athlon-load1),nothing") 105117395Skan 106132718Skan(define_reservation "athlon-store" "(athlon-load0 | athlon-load1)") 107132718Skan;; 128bit SSE instructions issue two stores at once 108132718Skan(define_reservation "athlon-store2" "(athlon-load0 + athlon-load1)") 109117395Skan 110117395Skan 111132718Skan;; The FP operations start to execute at stage 12 in the pipeline, while 112132718Skan;; integer operations start to execute at stage 9 for Athlon and 11 for K8 113132718Skan;; Compensate the difference for Athlon because it results in significantly 114132718Skan;; smaller automata. 115132718Skan(define_reservation "athlon-fpsched" "nothing,nothing,nothing") 116132718Skan;; The floating point loads. 117132718Skan(define_reservation "athlon-fpload" "(athlon-fpsched + athlon-load)") 118132718Skan(define_reservation "athlon-fpload2" "(athlon-fpsched + athlon-load2)") 119132718Skan(define_reservation "athlon-fploadk8" "(athlon-fpsched + athlon-load)") 120132718Skan(define_reservation "athlon-fpload2k8" "(athlon-fpsched + athlon-load2)") 121117395Skan 122117395Skan 123132718Skan;; The three fp units are fully pipelined with latency of 3 124132718Skan(define_cpu_unit "athlon-fadd" "athlon_fp") 125132718Skan(define_cpu_unit "athlon-fmul" "athlon_fp") 126132718Skan(define_cpu_unit "athlon-fstore" "athlon_fp") 127132718Skan(define_reservation "athlon-fany" "(athlon-fstore | athlon-fmul | athlon-fadd)") 128169689Skan(define_reservation "athlon-faddmul" "(athlon-fadd | athlon-fmul)") 129117395Skan 130132718Skan;; Vector operations usually consume many of pipes. 131132718Skan(define_reservation "athlon-fvector" "(athlon-fadd + athlon-fmul + athlon-fstore)") 132117395Skan 133117395Skan 134132718Skan;; Jump instructions are executed in the branch unit completely transparent to us 135132718Skan(define_insn_reservation "athlon_branch" 0 136251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 137132718Skan (eq_attr "type" "ibr")) 138132718Skan "athlon-direct,athlon-ieu") 139132718Skan(define_insn_reservation "athlon_call" 0 140169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 141132718Skan (eq_attr "type" "call,callv")) 142132718Skan "athlon-vector,athlon-ieu") 143251212Spfg(define_insn_reservation "athlon_call_amdfam10" 0 144251212Spfg (and (eq_attr "cpu" "amdfam10") 145251212Spfg (eq_attr "type" "call,callv")) 146251212Spfg "athlon-double,athlon-ieu") 147117395Skan 148132718Skan;; Latency of push operation is 3 cycles, but ESP value is available 149132718Skan;; earlier 150132718Skan(define_insn_reservation "athlon_push" 2 151251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 152132718Skan (eq_attr "type" "push")) 153132718Skan "athlon-direct,athlon-agu,athlon-store") 154132718Skan(define_insn_reservation "athlon_pop" 4 155169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 156132718Skan (eq_attr "type" "pop")) 157132718Skan "athlon-vector,athlon-load,athlon-ieu") 158132718Skan(define_insn_reservation "athlon_pop_k8" 3 159169689Skan (and (eq_attr "cpu" "k8,generic64") 160132718Skan (eq_attr "type" "pop")) 161132718Skan "athlon-double,(athlon-ieu+athlon-load)") 162251212Spfg(define_insn_reservation "athlon_pop_amdfam10" 3 163251212Spfg (and (eq_attr "cpu" "amdfam10") 164251212Spfg (eq_attr "type" "pop")) 165251212Spfg "athlon-direct,(athlon-ieu+athlon-load)") 166132718Skan(define_insn_reservation "athlon_leave" 3 167132718Skan (and (eq_attr "cpu" "athlon") 168132718Skan (eq_attr "type" "leave")) 169132718Skan "athlon-vector,(athlon-ieu+athlon-load)") 170132718Skan(define_insn_reservation "athlon_leave_k8" 3 171251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 172132718Skan (eq_attr "type" "leave")) 173132718Skan "athlon-double,(athlon-ieu+athlon-load)") 174117395Skan 175132718Skan;; Lea executes in AGU unit with 2 cycles latency. 176132718Skan(define_insn_reservation "athlon_lea" 2 177169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 178132718Skan (eq_attr "type" "lea")) 179132718Skan "athlon-direct,athlon-agu,nothing") 180251212Spfg;; Lea executes in AGU unit with 1 cycle latency on AMDFAM10 181251212Spfg(define_insn_reservation "athlon_lea_amdfam10" 1 182251212Spfg (and (eq_attr "cpu" "amdfam10") 183251212Spfg (eq_attr "type" "lea")) 184251212Spfg "athlon-direct,athlon-agu,nothing") 185117395Skan 186132718Skan;; Mul executes in special multiplier unit attached to IEU0 187132718Skan(define_insn_reservation "athlon_imul" 5 188132718Skan (and (eq_attr "cpu" "athlon") 189132718Skan (and (eq_attr "type" "imul") 190132718Skan (eq_attr "memory" "none,unknown"))) 191132718Skan "athlon-vector,athlon-ieu0,athlon-mult,nothing,nothing,athlon-ieu0") 192132718Skan;; ??? Widening multiply is vector or double. 193132718Skan(define_insn_reservation "athlon_imul_k8_DI" 4 194251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 195132718Skan (and (eq_attr "type" "imul") 196132718Skan (and (eq_attr "mode" "DI") 197132718Skan (eq_attr "memory" "none,unknown")))) 198132718Skan "athlon-direct0,athlon-ieu0,athlon-mult,nothing,athlon-ieu0") 199132718Skan(define_insn_reservation "athlon_imul_k8" 3 200251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 201132718Skan (and (eq_attr "type" "imul") 202132718Skan (eq_attr "memory" "none,unknown"))) 203132718Skan "athlon-direct0,athlon-ieu0,athlon-mult,athlon-ieu0") 204251212Spfg(define_insn_reservation "athlon_imul_amdfam10_HI" 4 205251212Spfg (and (eq_attr "cpu" "amdfam10") 206251212Spfg (and (eq_attr "type" "imul") 207251212Spfg (and (eq_attr "mode" "HI") 208251212Spfg (eq_attr "memory" "none,unknown")))) 209251212Spfg "athlon-vector,athlon-ieu0,athlon-mult,nothing,athlon-ieu0") 210132718Skan(define_insn_reservation "athlon_imul_mem" 8 211132718Skan (and (eq_attr "cpu" "athlon") 212132718Skan (and (eq_attr "type" "imul") 213132718Skan (eq_attr "memory" "load,both"))) 214132718Skan "athlon-vector,athlon-load,athlon-ieu,athlon-mult,nothing,nothing,athlon-ieu") 215132718Skan(define_insn_reservation "athlon_imul_mem_k8_DI" 7 216251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 217132718Skan (and (eq_attr "type" "imul") 218132718Skan (and (eq_attr "mode" "DI") 219132718Skan (eq_attr "memory" "load,both")))) 220132718Skan "athlon-vector,athlon-load,athlon-ieu,athlon-mult,nothing,athlon-ieu") 221132718Skan(define_insn_reservation "athlon_imul_mem_k8" 6 222251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 223132718Skan (and (eq_attr "type" "imul") 224132718Skan (eq_attr "memory" "load,both"))) 225132718Skan "athlon-vector,athlon-load,athlon-ieu,athlon-mult,athlon-ieu") 226117395Skan 227169689Skan;; Idiv cannot execute in parallel with other instructions. Dealing with it 228132718Skan;; as with short latency vector instruction is good approximation avoiding 229132718Skan;; scheduler from trying too hard to can hide it's latency by overlap with 230132718Skan;; other instructions. 231132718Skan;; ??? Experiments show that the idiv can overlap with roughly 6 cycles 232132718Skan;; of the other code 233251212Spfg;; Using the same heuristics for amdfam10 as K8 with idiv 234117395Skan 235132718Skan(define_insn_reservation "athlon_idiv" 6 236251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 237132718Skan (and (eq_attr "type" "idiv") 238132718Skan (eq_attr "memory" "none,unknown"))) 239132718Skan "athlon-vector,(athlon-ieu0*6+(athlon-fpsched,athlon-fvector))") 240132718Skan(define_insn_reservation "athlon_idiv_mem" 9 241251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 242132718Skan (and (eq_attr "type" "idiv") 243132718Skan (eq_attr "memory" "load,both"))) 244132718Skan "athlon-vector,((athlon-load,athlon-ieu0*6)+(athlon-fpsched,athlon-fvector))") 245132718Skan;; The parallelism of string instructions is not documented. Model it same way 246132718Skan;; as idiv to create smaller automata. This probably does not matter much. 247251212Spfg;; Using the same heuristics for amdfam10 as K8 with idiv 248132718Skan(define_insn_reservation "athlon_str" 6 249251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 250132718Skan (and (eq_attr "type" "str") 251132718Skan (eq_attr "memory" "load,both,store"))) 252132718Skan "athlon-vector,athlon-load,athlon-ieu0*6") 253117395Skan 254132718Skan(define_insn_reservation "athlon_idirect" 1 255169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 256132718Skan (and (eq_attr "athlon_decode" "direct") 257132718Skan (and (eq_attr "unit" "integer,unknown") 258132718Skan (eq_attr "memory" "none,unknown")))) 259132718Skan "athlon-direct,athlon-ieu") 260251212Spfg(define_insn_reservation "athlon_idirect_amdfam10" 1 261251212Spfg (and (eq_attr "cpu" "amdfam10") 262251212Spfg (and (eq_attr "amdfam10_decode" "direct") 263251212Spfg (and (eq_attr "unit" "integer,unknown") 264251212Spfg (eq_attr "memory" "none,unknown")))) 265251212Spfg "athlon-direct,athlon-ieu") 266132718Skan(define_insn_reservation "athlon_ivector" 2 267169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 268132718Skan (and (eq_attr "athlon_decode" "vector") 269132718Skan (and (eq_attr "unit" "integer,unknown") 270132718Skan (eq_attr "memory" "none,unknown")))) 271132718Skan "athlon-vector,athlon-ieu,athlon-ieu") 272251212Spfg(define_insn_reservation "athlon_ivector_amdfam10" 2 273251212Spfg (and (eq_attr "cpu" "amdfam10") 274251212Spfg (and (eq_attr "amdfam10_decode" "vector") 275251212Spfg (and (eq_attr "unit" "integer,unknown") 276251212Spfg (eq_attr "memory" "none,unknown")))) 277251212Spfg "athlon-vector,athlon-ieu,athlon-ieu") 278251212Spfg 279132718Skan(define_insn_reservation "athlon_idirect_loadmov" 3 280251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 281132718Skan (and (eq_attr "type" "imov") 282132718Skan (eq_attr "memory" "load"))) 283132718Skan "athlon-direct,athlon-load") 284251212Spfg 285132718Skan(define_insn_reservation "athlon_idirect_load" 4 286169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 287132718Skan (and (eq_attr "athlon_decode" "direct") 288132718Skan (and (eq_attr "unit" "integer,unknown") 289132718Skan (eq_attr "memory" "load")))) 290132718Skan "athlon-direct,athlon-load,athlon-ieu") 291251212Spfg(define_insn_reservation "athlon_idirect_load_amdfam10" 4 292251212Spfg (and (eq_attr "cpu" "amdfam10") 293251212Spfg (and (eq_attr "amdfam10_decode" "direct") 294251212Spfg (and (eq_attr "unit" "integer,unknown") 295251212Spfg (eq_attr "memory" "load")))) 296251212Spfg "athlon-direct,athlon-load,athlon-ieu") 297132718Skan(define_insn_reservation "athlon_ivector_load" 6 298169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 299132718Skan (and (eq_attr "athlon_decode" "vector") 300132718Skan (and (eq_attr "unit" "integer,unknown") 301132718Skan (eq_attr "memory" "load")))) 302132718Skan "athlon-vector,athlon-load,athlon-ieu,athlon-ieu") 303251212Spfg(define_insn_reservation "athlon_ivector_load_amdfam10" 6 304251212Spfg (and (eq_attr "cpu" "amdfam10") 305251212Spfg (and (eq_attr "amdfam10_decode" "vector") 306251212Spfg (and (eq_attr "unit" "integer,unknown") 307251212Spfg (eq_attr "memory" "load")))) 308251212Spfg "athlon-vector,athlon-load,athlon-ieu,athlon-ieu") 309251212Spfg 310132718Skan(define_insn_reservation "athlon_idirect_movstore" 1 311251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 312132718Skan (and (eq_attr "type" "imov") 313132718Skan (eq_attr "memory" "store"))) 314132718Skan "athlon-direct,athlon-agu,athlon-store") 315251212Spfg 316132718Skan(define_insn_reservation "athlon_idirect_both" 4 317169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 318132718Skan (and (eq_attr "athlon_decode" "direct") 319132718Skan (and (eq_attr "unit" "integer,unknown") 320132718Skan (eq_attr "memory" "both")))) 321132718Skan "athlon-direct,athlon-load, 322132718Skan athlon-ieu,athlon-store, 323132718Skan athlon-store") 324251212Spfg(define_insn_reservation "athlon_idirect_both_amdfam10" 4 325251212Spfg (and (eq_attr "cpu" "amdfam10") 326251212Spfg (and (eq_attr "amdfam10_decode" "direct") 327251212Spfg (and (eq_attr "unit" "integer,unknown") 328251212Spfg (eq_attr "memory" "both")))) 329251212Spfg "athlon-direct,athlon-load, 330251212Spfg athlon-ieu,athlon-store, 331251212Spfg athlon-store") 332251212Spfg 333132718Skan(define_insn_reservation "athlon_ivector_both" 6 334169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 335132718Skan (and (eq_attr "athlon_decode" "vector") 336132718Skan (and (eq_attr "unit" "integer,unknown") 337132718Skan (eq_attr "memory" "both")))) 338132718Skan "athlon-vector,athlon-load, 339132718Skan athlon-ieu, 340132718Skan athlon-ieu, 341132718Skan athlon-store") 342251212Spfg(define_insn_reservation "athlon_ivector_both_amdfam10" 6 343251212Spfg (and (eq_attr "cpu" "amdfam10") 344251212Spfg (and (eq_attr "amdfam10_decode" "vector") 345251212Spfg (and (eq_attr "unit" "integer,unknown") 346251212Spfg (eq_attr "memory" "both")))) 347251212Spfg "athlon-vector,athlon-load, 348251212Spfg athlon-ieu, 349251212Spfg athlon-ieu, 350251212Spfg athlon-store") 351251212Spfg 352132718Skan(define_insn_reservation "athlon_idirect_store" 1 353169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 354132718Skan (and (eq_attr "athlon_decode" "direct") 355132718Skan (and (eq_attr "unit" "integer,unknown") 356132718Skan (eq_attr "memory" "store")))) 357132718Skan "athlon-direct,(athlon-ieu+athlon-agu), 358132718Skan athlon-store") 359251212Spfg(define_insn_reservation "athlon_idirect_store_amdfam10" 1 360251212Spfg (and (eq_attr "cpu" "amdfam10") 361251212Spfg (and (eq_attr "amdfam10_decode" "direct") 362251212Spfg (and (eq_attr "unit" "integer,unknown") 363251212Spfg (eq_attr "memory" "store")))) 364251212Spfg "athlon-direct,(athlon-ieu+athlon-agu), 365251212Spfg athlon-store") 366251212Spfg 367132718Skan(define_insn_reservation "athlon_ivector_store" 2 368169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 369132718Skan (and (eq_attr "athlon_decode" "vector") 370132718Skan (and (eq_attr "unit" "integer,unknown") 371132718Skan (eq_attr "memory" "store")))) 372132718Skan "athlon-vector,(athlon-ieu+athlon-agu),athlon-ieu, 373132718Skan athlon-store") 374251212Spfg(define_insn_reservation "athlon_ivector_store_amdfam10" 2 375251212Spfg (and (eq_attr "cpu" "amdfam10") 376251212Spfg (and (eq_attr "amdfam10_decode" "vector") 377251212Spfg (and (eq_attr "unit" "integer,unknown") 378251212Spfg (eq_attr "memory" "store")))) 379251212Spfg "athlon-vector,(athlon-ieu+athlon-agu),athlon-ieu, 380251212Spfg athlon-store") 381117395Skan 382132718Skan;; Athlon floatin point unit 383132718Skan(define_insn_reservation "athlon_fldxf" 12 384132718Skan (and (eq_attr "cpu" "athlon") 385132718Skan (and (eq_attr "type" "fmov") 386132718Skan (and (eq_attr "memory" "load") 387132718Skan (eq_attr "mode" "XF")))) 388132718Skan "athlon-vector,athlon-fpload2,athlon-fvector*9") 389132718Skan(define_insn_reservation "athlon_fldxf_k8" 13 390251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 391132718Skan (and (eq_attr "type" "fmov") 392132718Skan (and (eq_attr "memory" "load") 393132718Skan (eq_attr "mode" "XF")))) 394132718Skan "athlon-vector,athlon-fpload2k8,athlon-fvector*9") 395132718Skan;; Assume superforwarding to take place so effective latency of fany op is 0. 396132718Skan(define_insn_reservation "athlon_fld" 0 397132718Skan (and (eq_attr "cpu" "athlon") 398132718Skan (and (eq_attr "type" "fmov") 399132718Skan (eq_attr "memory" "load"))) 400132718Skan "athlon-direct,athlon-fpload,athlon-fany") 401132718Skan(define_insn_reservation "athlon_fld_k8" 2 402251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 403132718Skan (and (eq_attr "type" "fmov") 404132718Skan (eq_attr "memory" "load"))) 405132718Skan "athlon-direct,athlon-fploadk8,athlon-fstore") 406117395Skan 407132718Skan(define_insn_reservation "athlon_fstxf" 10 408132718Skan (and (eq_attr "cpu" "athlon") 409132718Skan (and (eq_attr "type" "fmov") 410132718Skan (and (eq_attr "memory" "store,both") 411132718Skan (eq_attr "mode" "XF")))) 412132718Skan "athlon-vector,(athlon-fpsched+athlon-agu),(athlon-store2+(athlon-fvector*7))") 413132718Skan(define_insn_reservation "athlon_fstxf_k8" 8 414251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 415132718Skan (and (eq_attr "type" "fmov") 416132718Skan (and (eq_attr "memory" "store,both") 417132718Skan (eq_attr "mode" "XF")))) 418132718Skan "athlon-vector,(athlon-fpsched+athlon-agu),(athlon-store2+(athlon-fvector*6))") 419132718Skan(define_insn_reservation "athlon_fst" 4 420132718Skan (and (eq_attr "cpu" "athlon") 421132718Skan (and (eq_attr "type" "fmov") 422132718Skan (eq_attr "memory" "store,both"))) 423132718Skan "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)") 424132718Skan(define_insn_reservation "athlon_fst_k8" 2 425251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 426132718Skan (and (eq_attr "type" "fmov") 427132718Skan (eq_attr "memory" "store,both"))) 428132718Skan "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)") 429132718Skan(define_insn_reservation "athlon_fist" 4 430251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 431169689Skan (eq_attr "type" "fistp,fisttp")) 432132718Skan "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)") 433132718Skan(define_insn_reservation "athlon_fmov" 2 434251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 435132718Skan (eq_attr "type" "fmov")) 436132718Skan "athlon-direct,athlon-fpsched,athlon-faddmul") 437132718Skan(define_insn_reservation "athlon_fadd_load" 4 438132718Skan (and (eq_attr "cpu" "athlon") 439132718Skan (and (eq_attr "type" "fop") 440132718Skan (eq_attr "memory" "load"))) 441132718Skan "athlon-direct,athlon-fpload,athlon-fadd") 442132718Skan(define_insn_reservation "athlon_fadd_load_k8" 6 443251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 444132718Skan (and (eq_attr "type" "fop") 445132718Skan (eq_attr "memory" "load"))) 446132718Skan "athlon-direct,athlon-fploadk8,athlon-fadd") 447132718Skan(define_insn_reservation "athlon_fadd" 4 448251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 449132718Skan (eq_attr "type" "fop")) 450132718Skan "athlon-direct,athlon-fpsched,athlon-fadd") 451132718Skan(define_insn_reservation "athlon_fmul_load" 4 452132718Skan (and (eq_attr "cpu" "athlon") 453132718Skan (and (eq_attr "type" "fmul") 454132718Skan (eq_attr "memory" "load"))) 455132718Skan "athlon-direct,athlon-fpload,athlon-fmul") 456132718Skan(define_insn_reservation "athlon_fmul_load_k8" 6 457251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 458132718Skan (and (eq_attr "type" "fmul") 459132718Skan (eq_attr "memory" "load"))) 460132718Skan "athlon-direct,athlon-fploadk8,athlon-fmul") 461132718Skan(define_insn_reservation "athlon_fmul" 4 462251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 463132718Skan (eq_attr "type" "fmul")) 464132718Skan "athlon-direct,athlon-fpsched,athlon-fmul") 465132718Skan(define_insn_reservation "athlon_fsgn" 2 466251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 467132718Skan (eq_attr "type" "fsgn")) 468132718Skan "athlon-direct,athlon-fpsched,athlon-fmul") 469132718Skan(define_insn_reservation "athlon_fdiv_load" 24 470132718Skan (and (eq_attr "cpu" "athlon") 471132718Skan (and (eq_attr "type" "fdiv") 472132718Skan (eq_attr "memory" "load"))) 473132718Skan "athlon-direct,athlon-fpload,athlon-fmul") 474132718Skan(define_insn_reservation "athlon_fdiv_load_k8" 13 475251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 476132718Skan (and (eq_attr "type" "fdiv") 477132718Skan (eq_attr "memory" "load"))) 478132718Skan "athlon-direct,athlon-fploadk8,athlon-fmul") 479132718Skan(define_insn_reservation "athlon_fdiv" 24 480132718Skan (and (eq_attr "cpu" "athlon") 481132718Skan (eq_attr "type" "fdiv")) 482132718Skan "athlon-direct,athlon-fpsched,athlon-fmul") 483132718Skan(define_insn_reservation "athlon_fdiv_k8" 11 484251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 485132718Skan (eq_attr "type" "fdiv")) 486132718Skan "athlon-direct,athlon-fpsched,athlon-fmul") 487132718Skan(define_insn_reservation "athlon_fpspc_load" 103 488251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 489132718Skan (and (eq_attr "type" "fpspc") 490132718Skan (eq_attr "memory" "load"))) 491132718Skan "athlon-vector,athlon-fpload,athlon-fvector") 492132718Skan(define_insn_reservation "athlon_fpspc" 100 493251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 494132718Skan (eq_attr "type" "fpspc")) 495132718Skan "athlon-vector,athlon-fpsched,athlon-fvector") 496132718Skan(define_insn_reservation "athlon_fcmov_load" 7 497132718Skan (and (eq_attr "cpu" "athlon") 498132718Skan (and (eq_attr "type" "fcmov") 499132718Skan (eq_attr "memory" "load"))) 500132718Skan "athlon-vector,athlon-fpload,athlon-fvector") 501132718Skan(define_insn_reservation "athlon_fcmov" 7 502132718Skan (and (eq_attr "cpu" "athlon") 503132718Skan (eq_attr "type" "fcmov")) 504132718Skan "athlon-vector,athlon-fpsched,athlon-fvector") 505132718Skan(define_insn_reservation "athlon_fcmov_load_k8" 17 506251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 507132718Skan (and (eq_attr "type" "fcmov") 508132718Skan (eq_attr "memory" "load"))) 509132718Skan "athlon-vector,athlon-fploadk8,athlon-fvector") 510132718Skan(define_insn_reservation "athlon_fcmov_k8" 15 511251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 512132718Skan (eq_attr "type" "fcmov")) 513132718Skan "athlon-vector,athlon-fpsched,athlon-fvector") 514132718Skan;; fcomi is vector decoded by uses only one pipe. 515132718Skan(define_insn_reservation "athlon_fcomi_load" 3 516132718Skan (and (eq_attr "cpu" "athlon") 517132718Skan (and (eq_attr "type" "fcmp") 518132718Skan (and (eq_attr "athlon_decode" "vector") 519132718Skan (eq_attr "memory" "load")))) 520132718Skan "athlon-vector,athlon-fpload,athlon-fadd") 521132718Skan(define_insn_reservation "athlon_fcomi_load_k8" 5 522251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 523132718Skan (and (eq_attr "type" "fcmp") 524132718Skan (and (eq_attr "athlon_decode" "vector") 525132718Skan (eq_attr "memory" "load")))) 526132718Skan "athlon-vector,athlon-fploadk8,athlon-fadd") 527132718Skan(define_insn_reservation "athlon_fcomi" 3 528251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 529132718Skan (and (eq_attr "athlon_decode" "vector") 530132718Skan (eq_attr "type" "fcmp"))) 531132718Skan "athlon-vector,athlon-fpsched,athlon-fadd") 532132718Skan(define_insn_reservation "athlon_fcom_load" 2 533132718Skan (and (eq_attr "cpu" "athlon") 534132718Skan (and (eq_attr "type" "fcmp") 535132718Skan (eq_attr "memory" "load"))) 536132718Skan "athlon-direct,athlon-fpload,athlon-fadd") 537132718Skan(define_insn_reservation "athlon_fcom_load_k8" 4 538251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 539132718Skan (and (eq_attr "type" "fcmp") 540132718Skan (eq_attr "memory" "load"))) 541132718Skan "athlon-direct,athlon-fploadk8,athlon-fadd") 542132718Skan(define_insn_reservation "athlon_fcom" 2 543251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 544132718Skan (eq_attr "type" "fcmp")) 545132718Skan "athlon-direct,athlon-fpsched,athlon-fadd") 546132718Skan;; Never seen by the scheduler because we still don't do post reg-stack 547132718Skan;; scheduling. 548132718Skan;(define_insn_reservation "athlon_fxch" 2 549251212Spfg; (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 550132718Skan; (eq_attr "type" "fxch")) 551132718Skan; "athlon-direct,athlon-fpsched,athlon-fany") 552117395Skan 553132718Skan;; Athlon handle MMX operations in the FPU unit with shorter latencies 554117395Skan 555132718Skan(define_insn_reservation "athlon_movlpd_load" 0 556132718Skan (and (eq_attr "cpu" "athlon") 557132718Skan (and (eq_attr "type" "ssemov") 558132718Skan (match_operand:DF 1 "memory_operand" ""))) 559132718Skan "athlon-direct,athlon-fpload,athlon-fany") 560132718Skan(define_insn_reservation "athlon_movlpd_load_k8" 2 561132718Skan (and (eq_attr "cpu" "k8") 562132718Skan (and (eq_attr "type" "ssemov") 563132718Skan (match_operand:DF 1 "memory_operand" ""))) 564132718Skan "athlon-direct,athlon-fploadk8,athlon-fstore") 565169689Skan(define_insn_reservation "athlon_movsd_load_generic64" 2 566169689Skan (and (eq_attr "cpu" "generic64") 567169689Skan (and (eq_attr "type" "ssemov") 568169689Skan (match_operand:DF 1 "memory_operand" ""))) 569169689Skan "athlon-double,athlon-fploadk8,(athlon-fstore+athlon-fmul)") 570132718Skan(define_insn_reservation "athlon_movaps_load_k8" 2 571169689Skan (and (eq_attr "cpu" "k8,generic64") 572132718Skan (and (eq_attr "type" "ssemov") 573132718Skan (and (eq_attr "mode" "V4SF,V2DF,TI") 574132718Skan (eq_attr "memory" "load")))) 575132718Skan "athlon-double,athlon-fpload2k8,athlon-fstore,athlon-fstore") 576132718Skan(define_insn_reservation "athlon_movaps_load" 0 577132718Skan (and (eq_attr "cpu" "athlon") 578132718Skan (and (eq_attr "type" "ssemov") 579132718Skan (and (eq_attr "mode" "V4SF,V2DF,TI") 580132718Skan (eq_attr "memory" "load")))) 581132718Skan "athlon-vector,athlon-fpload2,(athlon-fany+athlon-fany)") 582132718Skan(define_insn_reservation "athlon_movss_load" 1 583132718Skan (and (eq_attr "cpu" "athlon") 584132718Skan (and (eq_attr "type" "ssemov") 585132718Skan (and (eq_attr "mode" "SF,DI") 586132718Skan (eq_attr "memory" "load")))) 587132718Skan "athlon-vector,athlon-fpload,(athlon-fany*2)") 588132718Skan(define_insn_reservation "athlon_movss_load_k8" 1 589169689Skan (and (eq_attr "cpu" "k8,generic64") 590132718Skan (and (eq_attr "type" "ssemov") 591132718Skan (and (eq_attr "mode" "SF,DI") 592132718Skan (eq_attr "memory" "load")))) 593132718Skan "athlon-double,athlon-fploadk8,(athlon-fstore+athlon-fany)") 594132718Skan(define_insn_reservation "athlon_mmxsseld" 0 595132718Skan (and (eq_attr "cpu" "athlon") 596132718Skan (and (eq_attr "type" "mmxmov,ssemov") 597132718Skan (eq_attr "memory" "load"))) 598132718Skan "athlon-direct,athlon-fpload,athlon-fany") 599132718Skan(define_insn_reservation "athlon_mmxsseld_k8" 2 600169689Skan (and (eq_attr "cpu" "k8,generic64") 601132718Skan (and (eq_attr "type" "mmxmov,ssemov") 602132718Skan (eq_attr "memory" "load"))) 603132718Skan "athlon-direct,athlon-fploadk8,athlon-fstore") 604251212Spfg;; On AMDFAM10 all double, single and integer packed and scalar SSEx data 605251212Spfg;; loads generated are direct path, latency of 2 and do not use any FP 606251212Spfg;; executions units. No seperate entries for movlpx/movhpx loads, which 607251212Spfg;; are direct path, latency of 4 and use the FADD/FMUL FP execution units, 608251212Spfg;; as they will not be generated. 609251212Spfg(define_insn_reservation "athlon_sseld_amdfam10" 2 610251212Spfg (and (eq_attr "cpu" "amdfam10") 611251212Spfg (and (eq_attr "type" "ssemov") 612251212Spfg (eq_attr "memory" "load"))) 613251212Spfg "athlon-direct,athlon-fploadk8") 614251212Spfg;; On AMDFAM10 MMX data loads generated are direct path, latency of 4 615251212Spfg;; and can use any FP executions units 616251212Spfg(define_insn_reservation "athlon_mmxld_amdfam10" 4 617251212Spfg (and (eq_attr "cpu" "amdfam10") 618251212Spfg (and (eq_attr "type" "mmxmov") 619251212Spfg (eq_attr "memory" "load"))) 620251212Spfg "athlon-direct,athlon-fploadk8, athlon-fany") 621132718Skan(define_insn_reservation "athlon_mmxssest" 3 622169689Skan (and (eq_attr "cpu" "k8,generic64") 623132718Skan (and (eq_attr "type" "mmxmov,ssemov") 624132718Skan (and (eq_attr "mode" "V4SF,V2DF,TI") 625132718Skan (eq_attr "memory" "store,both")))) 626132718Skan "athlon-vector,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store2)*2)") 627132718Skan(define_insn_reservation "athlon_mmxssest_k8" 3 628169689Skan (and (eq_attr "cpu" "k8,generic64") 629132718Skan (and (eq_attr "type" "mmxmov,ssemov") 630132718Skan (and (eq_attr "mode" "V4SF,V2DF,TI") 631132718Skan (eq_attr "memory" "store,both")))) 632132718Skan "athlon-double,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store2)*2)") 633132718Skan(define_insn_reservation "athlon_mmxssest_short" 2 634169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 635132718Skan (and (eq_attr "type" "mmxmov,ssemov") 636132718Skan (eq_attr "memory" "store,both"))) 637132718Skan "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)") 638251212Spfg;; On AMDFAM10 all double, single and integer packed SSEx data stores 639251212Spfg;; generated are all double path, latency of 2 and use the FSTORE FP 640251212Spfg;; execution unit. No entries seperate for movupx/movdqu, which are 641251212Spfg;; vector path, latency of 3 and use the FSTORE*2 FP execution unit, 642251212Spfg;; as they will not be generated. 643251212Spfg(define_insn_reservation "athlon_ssest_amdfam10" 2 644251212Spfg (and (eq_attr "cpu" "amdfam10") 645251212Spfg (and (eq_attr "type" "ssemov") 646251212Spfg (and (eq_attr "mode" "V4SF,V2DF,TI") 647251212Spfg (eq_attr "memory" "store,both")))) 648251212Spfg "athlon-double,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store)*2)") 649251212Spfg;; On AMDFAM10 all double, single and integer scalar SSEx and MMX 650251212Spfg;; data stores generated are all direct path, latency of 2 and use 651251212Spfg;; the FSTORE FP execution unit 652251212Spfg(define_insn_reservation "athlon_mmxssest_short_amdfam10" 2 653251212Spfg (and (eq_attr "cpu" "amdfam10") 654251212Spfg (and (eq_attr "type" "mmxmov,ssemov") 655251212Spfg (eq_attr "memory" "store,both"))) 656251212Spfg "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)") 657169689Skan(define_insn_reservation "athlon_movaps_k8" 2 658169689Skan (and (eq_attr "cpu" "k8,generic64") 659132718Skan (and (eq_attr "type" "ssemov") 660132718Skan (eq_attr "mode" "V4SF,V2DF,TI"))) 661169689Skan "athlon-double,athlon-fpsched,((athlon-faddmul+athlon-faddmul) | (athlon-faddmul, athlon-faddmul))") 662169689Skan(define_insn_reservation "athlon_movaps" 2 663132718Skan (and (eq_attr "cpu" "athlon") 664132718Skan (and (eq_attr "type" "ssemov") 665132718Skan (eq_attr "mode" "V4SF,V2DF,TI"))) 666132718Skan "athlon-vector,athlon-fpsched,(athlon-faddmul+athlon-faddmul)") 667132718Skan(define_insn_reservation "athlon_mmxssemov" 2 668169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 669132718Skan (eq_attr "type" "mmxmov,ssemov")) 670132718Skan "athlon-direct,athlon-fpsched,athlon-faddmul") 671132718Skan(define_insn_reservation "athlon_mmxmul_load" 4 672169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 673132718Skan (and (eq_attr "type" "mmxmul") 674132718Skan (eq_attr "memory" "load"))) 675132718Skan "athlon-direct,athlon-fpload,athlon-fmul") 676132718Skan(define_insn_reservation "athlon_mmxmul" 3 677169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 678132718Skan (eq_attr "type" "mmxmul")) 679132718Skan "athlon-direct,athlon-fpsched,athlon-fmul") 680132718Skan(define_insn_reservation "athlon_mmx_load" 3 681169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 682132718Skan (and (eq_attr "unit" "mmx") 683132718Skan (eq_attr "memory" "load"))) 684132718Skan "athlon-direct,athlon-fpload,athlon-faddmul") 685132718Skan(define_insn_reservation "athlon_mmx" 2 686169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 687132718Skan (eq_attr "unit" "mmx")) 688132718Skan "athlon-direct,athlon-fpsched,athlon-faddmul") 689132718Skan;; SSE operations are handled by the i387 unit as well. The latency 690132718Skan;; is same as for i387 operations for scalar operations 691117395Skan 692132718Skan(define_insn_reservation "athlon_sselog_load" 3 693132718Skan (and (eq_attr "cpu" "athlon") 694169689Skan (and (eq_attr "type" "sselog,sselog1") 695132718Skan (eq_attr "memory" "load"))) 696132718Skan "athlon-vector,athlon-fpload2,(athlon-fmul*2)") 697132718Skan(define_insn_reservation "athlon_sselog_load_k8" 5 698169689Skan (and (eq_attr "cpu" "k8,generic64") 699169689Skan (and (eq_attr "type" "sselog,sselog1") 700132718Skan (eq_attr "memory" "load"))) 701132718Skan "athlon-double,athlon-fpload2k8,(athlon-fmul*2)") 702251212Spfg(define_insn_reservation "athlon_sselog_load_amdfam10" 4 703251212Spfg (and (eq_attr "cpu" "amdfam10") 704251212Spfg (and (eq_attr "type" "sselog,sselog1") 705251212Spfg (eq_attr "memory" "load"))) 706251212Spfg "athlon-direct,athlon-fploadk8,(athlon-fadd|athlon-fmul)") 707132718Skan(define_insn_reservation "athlon_sselog" 3 708132718Skan (and (eq_attr "cpu" "athlon") 709169689Skan (eq_attr "type" "sselog,sselog1")) 710132718Skan "athlon-vector,athlon-fpsched,athlon-fmul*2") 711132718Skan(define_insn_reservation "athlon_sselog_k8" 3 712169689Skan (and (eq_attr "cpu" "k8,generic64") 713169689Skan (eq_attr "type" "sselog,sselog1")) 714132718Skan "athlon-double,athlon-fpsched,athlon-fmul") 715251212Spfg(define_insn_reservation "athlon_sselog_amdfam10" 2 716251212Spfg (and (eq_attr "cpu" "amdfam10") 717251212Spfg (eq_attr "type" "sselog,sselog1")) 718251212Spfg "athlon-direct,athlon-fpsched,(athlon-fadd|athlon-fmul)") 719251212Spfg 720169689Skan;; ??? pcmp executes in addmul, probably not worthwhile to bother about that. 721132718Skan(define_insn_reservation "athlon_ssecmp_load" 2 722132718Skan (and (eq_attr "cpu" "athlon") 723132718Skan (and (eq_attr "type" "ssecmp") 724132718Skan (and (eq_attr "mode" "SF,DF,DI") 725132718Skan (eq_attr "memory" "load")))) 726132718Skan "athlon-direct,athlon-fpload,athlon-fadd") 727132718Skan(define_insn_reservation "athlon_ssecmp_load_k8" 4 728251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 729132718Skan (and (eq_attr "type" "ssecmp") 730132718Skan (and (eq_attr "mode" "SF,DF,DI,TI") 731132718Skan (eq_attr "memory" "load")))) 732132718Skan "athlon-direct,athlon-fploadk8,athlon-fadd") 733132718Skan(define_insn_reservation "athlon_ssecmp" 2 734251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 735132718Skan (and (eq_attr "type" "ssecmp") 736132718Skan (eq_attr "mode" "SF,DF,DI,TI"))) 737132718Skan "athlon-direct,athlon-fpsched,athlon-fadd") 738132718Skan(define_insn_reservation "athlon_ssecmpvector_load" 3 739132718Skan (and (eq_attr "cpu" "athlon") 740132718Skan (and (eq_attr "type" "ssecmp") 741132718Skan (eq_attr "memory" "load"))) 742132718Skan "athlon-vector,athlon-fpload2,(athlon-fadd*2)") 743132718Skan(define_insn_reservation "athlon_ssecmpvector_load_k8" 5 744169689Skan (and (eq_attr "cpu" "k8,generic64") 745132718Skan (and (eq_attr "type" "ssecmp") 746132718Skan (eq_attr "memory" "load"))) 747132718Skan "athlon-double,athlon-fpload2k8,(athlon-fadd*2)") 748251212Spfg(define_insn_reservation "athlon_ssecmpvector_load_amdfam10" 4 749251212Spfg (and (eq_attr "cpu" "amdfam10") 750251212Spfg (and (eq_attr "type" "ssecmp") 751251212Spfg (eq_attr "memory" "load"))) 752251212Spfg "athlon-direct,athlon-fploadk8,athlon-fadd") 753132718Skan(define_insn_reservation "athlon_ssecmpvector" 3 754132718Skan (and (eq_attr "cpu" "athlon") 755132718Skan (eq_attr "type" "ssecmp")) 756132718Skan "athlon-vector,athlon-fpsched,(athlon-fadd*2)") 757132718Skan(define_insn_reservation "athlon_ssecmpvector_k8" 3 758169689Skan (and (eq_attr "cpu" "k8,generic64") 759132718Skan (eq_attr "type" "ssecmp")) 760132718Skan "athlon-double,athlon-fpsched,(athlon-fadd*2)") 761251212Spfg(define_insn_reservation "athlon_ssecmpvector_amdfam10" 2 762251212Spfg (and (eq_attr "cpu" "amdfam10") 763251212Spfg (eq_attr "type" "ssecmp")) 764251212Spfg "athlon-direct,athlon-fpsched,athlon-fadd") 765132718Skan(define_insn_reservation "athlon_ssecomi_load" 4 766132718Skan (and (eq_attr "cpu" "athlon") 767132718Skan (and (eq_attr "type" "ssecomi") 768132718Skan (eq_attr "memory" "load"))) 769132718Skan "athlon-vector,athlon-fpload,athlon-fadd") 770132718Skan(define_insn_reservation "athlon_ssecomi_load_k8" 6 771169689Skan (and (eq_attr "cpu" "k8,generic64") 772132718Skan (and (eq_attr "type" "ssecomi") 773132718Skan (eq_attr "memory" "load"))) 774132718Skan "athlon-vector,athlon-fploadk8,athlon-fadd") 775251212Spfg(define_insn_reservation "athlon_ssecomi_load_amdfam10" 5 776251212Spfg (and (eq_attr "cpu" "amdfam10") 777251212Spfg (and (eq_attr "type" "ssecomi") 778251212Spfg (eq_attr "memory" "load"))) 779251212Spfg "athlon-direct,athlon-fploadk8,athlon-fadd") 780132718Skan(define_insn_reservation "athlon_ssecomi" 4 781169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 782132718Skan (eq_attr "type" "ssecmp")) 783132718Skan "athlon-vector,athlon-fpsched,athlon-fadd") 784251212Spfg(define_insn_reservation "athlon_ssecomi_amdfam10" 3 785251212Spfg (and (eq_attr "cpu" "amdfam10") 786251212Spfg;; It seems athlon_ssecomi has a bug in the attr_type, fixed for amdfam10 787251212Spfg (eq_attr "type" "ssecomi")) 788251212Spfg "athlon-direct,athlon-fpsched,athlon-fadd") 789132718Skan(define_insn_reservation "athlon_sseadd_load" 4 790132718Skan (and (eq_attr "cpu" "athlon") 791132718Skan (and (eq_attr "type" "sseadd") 792132718Skan (and (eq_attr "mode" "SF,DF,DI") 793132718Skan (eq_attr "memory" "load")))) 794132718Skan "athlon-direct,athlon-fpload,athlon-fadd") 795132718Skan(define_insn_reservation "athlon_sseadd_load_k8" 6 796251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 797132718Skan (and (eq_attr "type" "sseadd") 798132718Skan (and (eq_attr "mode" "SF,DF,DI") 799132718Skan (eq_attr "memory" "load")))) 800132718Skan "athlon-direct,athlon-fploadk8,athlon-fadd") 801132718Skan(define_insn_reservation "athlon_sseadd" 4 802251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 803132718Skan (and (eq_attr "type" "sseadd") 804132718Skan (eq_attr "mode" "SF,DF,DI"))) 805132718Skan "athlon-direct,athlon-fpsched,athlon-fadd") 806132718Skan(define_insn_reservation "athlon_sseaddvector_load" 5 807132718Skan (and (eq_attr "cpu" "athlon") 808132718Skan (and (eq_attr "type" "sseadd") 809132718Skan (eq_attr "memory" "load"))) 810132718Skan "athlon-vector,athlon-fpload2,(athlon-fadd*2)") 811132718Skan(define_insn_reservation "athlon_sseaddvector_load_k8" 7 812169689Skan (and (eq_attr "cpu" "k8,generic64") 813132718Skan (and (eq_attr "type" "sseadd") 814132718Skan (eq_attr "memory" "load"))) 815132718Skan "athlon-double,athlon-fpload2k8,(athlon-fadd*2)") 816251212Spfg(define_insn_reservation "athlon_sseaddvector_load_amdfam10" 6 817251212Spfg (and (eq_attr "cpu" "amdfam10") 818251212Spfg (and (eq_attr "type" "sseadd") 819251212Spfg (eq_attr "memory" "load"))) 820251212Spfg "athlon-direct,athlon-fploadk8,athlon-fadd") 821132718Skan(define_insn_reservation "athlon_sseaddvector" 5 822132718Skan (and (eq_attr "cpu" "athlon") 823132718Skan (eq_attr "type" "sseadd")) 824132718Skan "athlon-vector,athlon-fpsched,(athlon-fadd*2)") 825132718Skan(define_insn_reservation "athlon_sseaddvector_k8" 5 826169689Skan (and (eq_attr "cpu" "k8,generic64") 827132718Skan (eq_attr "type" "sseadd")) 828132718Skan "athlon-double,athlon-fpsched,(athlon-fadd*2)") 829251212Spfg(define_insn_reservation "athlon_sseaddvector_amdfam10" 4 830251212Spfg (and (eq_attr "cpu" "amdfam10") 831251212Spfg (eq_attr "type" "sseadd")) 832251212Spfg "athlon-direct,athlon-fpsched,athlon-fadd") 833117395Skan 834132718Skan;; Conversions behaves very irregularly and the scheduling is critical here. 835132718Skan;; Take each instruction separately. Assume that the mode is always set to the 836132718Skan;; destination one and athlon_decode is set to the K8 versions. 837117395Skan 838132718Skan;; cvtss2sd 839132718Skan(define_insn_reservation "athlon_ssecvt_cvtss2sd_load_k8" 4 840169689Skan (and (eq_attr "cpu" "k8,athlon,generic64") 841132718Skan (and (eq_attr "type" "ssecvt") 842132718Skan (and (eq_attr "athlon_decode" "direct") 843132718Skan (and (eq_attr "mode" "DF") 844132718Skan (eq_attr "memory" "load"))))) 845132718Skan "athlon-direct,athlon-fploadk8,athlon-fstore") 846251212Spfg(define_insn_reservation "athlon_ssecvt_cvtss2sd_load_amdfam10" 7 847251212Spfg (and (eq_attr "cpu" "amdfam10") 848251212Spfg (and (eq_attr "type" "ssecvt") 849251212Spfg (and (eq_attr "amdfam10_decode" "double") 850251212Spfg (and (eq_attr "mode" "DF") 851251212Spfg (eq_attr "memory" "load"))))) 852251212Spfg "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 853132718Skan(define_insn_reservation "athlon_ssecvt_cvtss2sd" 2 854169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 855132718Skan (and (eq_attr "type" "ssecvt") 856132718Skan (and (eq_attr "athlon_decode" "direct") 857132718Skan (eq_attr "mode" "DF")))) 858132718Skan "athlon-direct,athlon-fpsched,athlon-fstore") 859251212Spfg(define_insn_reservation "athlon_ssecvt_cvtss2sd_amdfam10" 7 860251212Spfg (and (eq_attr "cpu" "amdfam10") 861251212Spfg (and (eq_attr "type" "ssecvt") 862251212Spfg (and (eq_attr "amdfam10_decode" "vector") 863251212Spfg (eq_attr "mode" "DF")))) 864251212Spfg "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)") 865132718Skan;; cvtps2pd. Model same way the other double decoded FP conversions. 866132718Skan(define_insn_reservation "athlon_ssecvt_cvtps2pd_load_k8" 5 867169689Skan (and (eq_attr "cpu" "k8,athlon,generic64") 868132718Skan (and (eq_attr "type" "ssecvt") 869132718Skan (and (eq_attr "athlon_decode" "double") 870132718Skan (and (eq_attr "mode" "V2DF,V4SF,TI") 871132718Skan (eq_attr "memory" "load"))))) 872132718Skan "athlon-double,athlon-fpload2k8,(athlon-fstore*2)") 873251212Spfg(define_insn_reservation "athlon_ssecvt_cvtps2pd_load_amdfam10" 4 874251212Spfg (and (eq_attr "cpu" "amdfam10") 875251212Spfg (and (eq_attr "type" "ssecvt") 876251212Spfg (and (eq_attr "amdfam10_decode" "direct") 877251212Spfg (and (eq_attr "mode" "V2DF,V4SF,TI") 878251212Spfg (eq_attr "memory" "load"))))) 879251212Spfg "athlon-direct,athlon-fploadk8,athlon-fstore") 880132718Skan(define_insn_reservation "athlon_ssecvt_cvtps2pd_k8" 3 881169689Skan (and (eq_attr "cpu" "k8,athlon,generic64") 882132718Skan (and (eq_attr "type" "ssecvt") 883132718Skan (and (eq_attr "athlon_decode" "double") 884132718Skan (eq_attr "mode" "V2DF,V4SF,TI")))) 885132718Skan "athlon-double,athlon-fpsched,athlon-fstore,athlon-fstore") 886251212Spfg(define_insn_reservation "athlon_ssecvt_cvtps2pd_amdfam10" 2 887251212Spfg (and (eq_attr "cpu" "amdfam10") 888251212Spfg (and (eq_attr "type" "ssecvt") 889251212Spfg (and (eq_attr "amdfam10_decode" "direct") 890251212Spfg (eq_attr "mode" "V2DF,V4SF,TI")))) 891251212Spfg "athlon-direct,athlon-fpsched,athlon-fstore") 892132718Skan;; cvtsi2sd mem,reg is directpath path (cvtsi2sd reg,reg is doublepath) 893132718Skan;; cvtsi2sd has troughput 1 and is executed in store unit with latency of 6 894132718Skan(define_insn_reservation "athlon_sseicvt_cvtsi2sd_load" 6 895132718Skan (and (eq_attr "cpu" "athlon,k8") 896132718Skan (and (eq_attr "type" "sseicvt") 897132718Skan (and (eq_attr "athlon_decode" "direct") 898132718Skan (and (eq_attr "mode" "SF,DF") 899132718Skan (eq_attr "memory" "load"))))) 900132718Skan "athlon-direct,athlon-fploadk8,athlon-fstore") 901251212Spfg(define_insn_reservation "athlon_sseicvt_cvtsi2sd_load_amdfam10" 9 902251212Spfg (and (eq_attr "cpu" "amdfam10") 903251212Spfg (and (eq_attr "type" "sseicvt") 904251212Spfg (and (eq_attr "amdfam10_decode" "double") 905251212Spfg (and (eq_attr "mode" "SF,DF") 906251212Spfg (eq_attr "memory" "load"))))) 907251212Spfg "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 908132718Skan;; cvtsi2ss mem, reg is doublepath 909132718Skan(define_insn_reservation "athlon_sseicvt_cvtsi2ss_load" 9 910132718Skan (and (eq_attr "cpu" "athlon") 911132718Skan (and (eq_attr "type" "sseicvt") 912132718Skan (and (eq_attr "athlon_decode" "double") 913132718Skan (and (eq_attr "mode" "SF,DF") 914132718Skan (eq_attr "memory" "load"))))) 915132718Skan "athlon-vector,athlon-fpload,(athlon-fstore*2)") 916132718Skan(define_insn_reservation "athlon_sseicvt_cvtsi2ss_load_k8" 9 917169689Skan (and (eq_attr "cpu" "k8,generic64") 918132718Skan (and (eq_attr "type" "sseicvt") 919132718Skan (and (eq_attr "athlon_decode" "double") 920132718Skan (and (eq_attr "mode" "SF,DF") 921132718Skan (eq_attr "memory" "load"))))) 922132718Skan "athlon-double,athlon-fploadk8,(athlon-fstore*2)") 923251212Spfg(define_insn_reservation "athlon_sseicvt_cvtsi2ss_load_amdfam10" 9 924251212Spfg (and (eq_attr "cpu" "amdfam10") 925251212Spfg (and (eq_attr "type" "sseicvt") 926251212Spfg (and (eq_attr "amdfam10_decode" "double") 927251212Spfg (and (eq_attr "mode" "SF,DF") 928251212Spfg (eq_attr "memory" "load"))))) 929251212Spfg "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 930132718Skan;; cvtsi2sd reg,reg is double decoded (vector on Athlon) 931132718Skan(define_insn_reservation "athlon_sseicvt_cvtsi2sd_k8" 11 932169689Skan (and (eq_attr "cpu" "k8,athlon,generic64") 933132718Skan (and (eq_attr "type" "sseicvt") 934132718Skan (and (eq_attr "athlon_decode" "double") 935132718Skan (and (eq_attr "mode" "SF,DF") 936132718Skan (eq_attr "memory" "none"))))) 937132718Skan "athlon-double,athlon-fploadk8,athlon-fstore") 938251212Spfg(define_insn_reservation "athlon_sseicvt_cvtsi2sd_amdfam10" 14 939251212Spfg (and (eq_attr "cpu" "amdfam10") 940251212Spfg (and (eq_attr "type" "sseicvt") 941251212Spfg (and (eq_attr "amdfam10_decode" "vector") 942251212Spfg (and (eq_attr "mode" "SF,DF") 943251212Spfg (eq_attr "memory" "none"))))) 944251212Spfg "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 945132718Skan;; cvtsi2ss reg, reg is doublepath 946132718Skan(define_insn_reservation "athlon_sseicvt_cvtsi2ss" 14 947169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 948132718Skan (and (eq_attr "type" "sseicvt") 949132718Skan (and (eq_attr "athlon_decode" "vector") 950132718Skan (and (eq_attr "mode" "SF,DF") 951132718Skan (eq_attr "memory" "none"))))) 952132718Skan "athlon-vector,athlon-fploadk8,(athlon-fvector*2)") 953251212Spfg(define_insn_reservation "athlon_sseicvt_cvtsi2ss_amdfam10" 14 954251212Spfg (and (eq_attr "cpu" "amdfam10") 955251212Spfg (and (eq_attr "type" "sseicvt") 956251212Spfg (and (eq_attr "amdfam10_decode" "vector") 957251212Spfg (and (eq_attr "mode" "SF,DF") 958251212Spfg (eq_attr "memory" "none"))))) 959251212Spfg "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 960132718Skan;; cvtsd2ss mem,reg is doublepath, troughput unknown, latency 9 961132718Skan(define_insn_reservation "athlon_ssecvt_cvtsd2ss_load_k8" 9 962169689Skan (and (eq_attr "cpu" "k8,athlon,generic64") 963132718Skan (and (eq_attr "type" "ssecvt") 964132718Skan (and (eq_attr "athlon_decode" "double") 965132718Skan (and (eq_attr "mode" "SF") 966132718Skan (eq_attr "memory" "load"))))) 967132718Skan "athlon-double,athlon-fploadk8,(athlon-fstore*3)") 968251212Spfg(define_insn_reservation "athlon_ssecvt_cvtsd2ss_load_amdfam10" 9 969251212Spfg (and (eq_attr "cpu" "amdfam10") 970251212Spfg (and (eq_attr "type" "ssecvt") 971251212Spfg (and (eq_attr "amdfam10_decode" "double") 972251212Spfg (and (eq_attr "mode" "SF") 973251212Spfg (eq_attr "memory" "load"))))) 974251212Spfg "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 975132718Skan;; cvtsd2ss reg,reg is vectorpath, troughput unknown, latency 12 976132718Skan(define_insn_reservation "athlon_ssecvt_cvtsd2ss" 12 977169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 978132718Skan (and (eq_attr "type" "ssecvt") 979132718Skan (and (eq_attr "athlon_decode" "vector") 980132718Skan (and (eq_attr "mode" "SF") 981132718Skan (eq_attr "memory" "none"))))) 982132718Skan "athlon-vector,athlon-fpsched,(athlon-fvector*3)") 983251212Spfg(define_insn_reservation "athlon_ssecvt_cvtsd2ss_amdfam10" 8 984251212Spfg (and (eq_attr "cpu" "amdfam10") 985251212Spfg (and (eq_attr "type" "ssecvt") 986251212Spfg (and (eq_attr "amdfam10_decode" "vector") 987251212Spfg (and (eq_attr "mode" "SF") 988251212Spfg (eq_attr "memory" "none"))))) 989251212Spfg "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)") 990132718Skan(define_insn_reservation "athlon_ssecvt_cvtpd2ps_load_k8" 8 991169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 992132718Skan (and (eq_attr "type" "ssecvt") 993132718Skan (and (eq_attr "athlon_decode" "vector") 994132718Skan (and (eq_attr "mode" "V4SF,V2DF,TI") 995132718Skan (eq_attr "memory" "load"))))) 996132718Skan "athlon-double,athlon-fpload2k8,(athlon-fstore*3)") 997251212Spfg(define_insn_reservation "athlon_ssecvt_cvtpd2ps_load_amdfam10" 9 998251212Spfg (and (eq_attr "cpu" "amdfam10") 999251212Spfg (and (eq_attr "type" "ssecvt") 1000251212Spfg (and (eq_attr "amdfam10_decode" "double") 1001251212Spfg (and (eq_attr "mode" "V4SF,V2DF,TI") 1002251212Spfg (eq_attr "memory" "load"))))) 1003251212Spfg "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 1004132718Skan;; cvtpd2ps mem,reg is vectorpath, troughput unknown, latency 10 1005132718Skan;; ??? Why it is fater than cvtsd2ss? 1006132718Skan(define_insn_reservation "athlon_ssecvt_cvtpd2ps" 8 1007169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 1008132718Skan (and (eq_attr "type" "ssecvt") 1009132718Skan (and (eq_attr "athlon_decode" "vector") 1010132718Skan (and (eq_attr "mode" "V4SF,V2DF,TI") 1011132718Skan (eq_attr "memory" "none"))))) 1012132718Skan "athlon-vector,athlon-fpsched,athlon-fvector*2") 1013251212Spfg(define_insn_reservation "athlon_ssecvt_cvtpd2ps_amdfam10" 7 1014251212Spfg (and (eq_attr "cpu" "amdfam10") 1015251212Spfg (and (eq_attr "type" "ssecvt") 1016251212Spfg (and (eq_attr "amdfam10_decode" "double") 1017251212Spfg (and (eq_attr "mode" "V4SF,V2DF,TI") 1018251212Spfg (eq_attr "memory" "none"))))) 1019251212Spfg "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)") 1020132718Skan;; cvtsd2si mem,reg is doublepath, troughput 1, latency 9 1021132718Skan(define_insn_reservation "athlon_secvt_cvtsX2si_load" 9 1022169689Skan (and (eq_attr "cpu" "athlon,k8,generic64") 1023132718Skan (and (eq_attr "type" "sseicvt") 1024132718Skan (and (eq_attr "athlon_decode" "vector") 1025132718Skan (and (eq_attr "mode" "SI,DI") 1026132718Skan (eq_attr "memory" "load"))))) 1027132718Skan "athlon-vector,athlon-fploadk8,athlon-fvector") 1028251212Spfg(define_insn_reservation "athlon_secvt_cvtsX2si_load_amdfam10" 10 1029251212Spfg (and (eq_attr "cpu" "amdfam10") 1030251212Spfg (and (eq_attr "type" "sseicvt") 1031251212Spfg (and (eq_attr "amdfam10_decode" "double") 1032251212Spfg (and (eq_attr "mode" "SI,DI") 1033251212Spfg (eq_attr "memory" "load"))))) 1034251212Spfg "athlon-double,athlon-fploadk8,(athlon-fadd+athlon-fstore)") 1035132718Skan;; cvtsd2si reg,reg is doublepath, troughput 1, latency 9 1036132718Skan(define_insn_reservation "athlon_ssecvt_cvtsX2si" 9 1037132718Skan (and (eq_attr "cpu" "athlon") 1038132718Skan (and (eq_attr "type" "sseicvt") 1039132718Skan (and (eq_attr "athlon_decode" "double") 1040132718Skan (and (eq_attr "mode" "SI,DI") 1041132718Skan (eq_attr "memory" "none"))))) 1042132718Skan "athlon-vector,athlon-fpsched,athlon-fvector") 1043132718Skan(define_insn_reservation "athlon_ssecvt_cvtsX2si_k8" 9 1044169689Skan (and (eq_attr "cpu" "k8,generic64") 1045132718Skan (and (eq_attr "type" "sseicvt") 1046132718Skan (and (eq_attr "athlon_decode" "double") 1047132718Skan (and (eq_attr "mode" "SI,DI") 1048132718Skan (eq_attr "memory" "none"))))) 1049132718Skan "athlon-double,athlon-fpsched,athlon-fstore") 1050251212Spfg(define_insn_reservation "athlon_ssecvt_cvtsX2si_amdfam10" 8 1051251212Spfg (and (eq_attr "cpu" "amdfam10") 1052251212Spfg (and (eq_attr "type" "sseicvt") 1053251212Spfg (and (eq_attr "amdfam10_decode" "double") 1054251212Spfg (and (eq_attr "mode" "SI,DI") 1055251212Spfg (eq_attr "memory" "none"))))) 1056251212Spfg "athlon-double,athlon-fpsched,(athlon-fadd+athlon-fstore)") 1057251212Spfg;; cvtpd2dq reg,mem is doublepath, troughput 1, latency 9 on amdfam10 1058251212Spfg(define_insn_reservation "athlon_sseicvt_cvtpd2dq_load_amdfam10" 9 1059251212Spfg (and (eq_attr "cpu" "amdfam10") 1060251212Spfg (and (eq_attr "type" "sseicvt") 1061251212Spfg (and (eq_attr "amdfam10_decode" "double") 1062251212Spfg (and (eq_attr "mode" "TI") 1063251212Spfg (eq_attr "memory" "load"))))) 1064251212Spfg "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)") 1065251212Spfg;; cvtpd2dq reg,mem is doublepath, troughput 1, latency 7 on amdfam10 1066251212Spfg(define_insn_reservation "athlon_sseicvt_cvtpd2dq_amdfam10" 7 1067251212Spfg (and (eq_attr "cpu" "amdfam10") 1068251212Spfg (and (eq_attr "type" "sseicvt") 1069251212Spfg (and (eq_attr "amdfam10_decode" "double") 1070251212Spfg (and (eq_attr "mode" "TI") 1071251212Spfg (eq_attr "memory" "none"))))) 1072251212Spfg "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)") 1073117395Skan 1074132718Skan 1075132718Skan(define_insn_reservation "athlon_ssemul_load" 4 1076132718Skan (and (eq_attr "cpu" "athlon") 1077132718Skan (and (eq_attr "type" "ssemul") 1078132718Skan (and (eq_attr "mode" "SF,DF") 1079132718Skan (eq_attr "memory" "load")))) 1080132718Skan "athlon-direct,athlon-fpload,athlon-fmul") 1081132718Skan(define_insn_reservation "athlon_ssemul_load_k8" 6 1082251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 1083132718Skan (and (eq_attr "type" "ssemul") 1084132718Skan (and (eq_attr "mode" "SF,DF") 1085132718Skan (eq_attr "memory" "load")))) 1086132718Skan "athlon-direct,athlon-fploadk8,athlon-fmul") 1087132718Skan(define_insn_reservation "athlon_ssemul" 4 1088251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 1089132718Skan (and (eq_attr "type" "ssemul") 1090132718Skan (eq_attr "mode" "SF,DF"))) 1091132718Skan "athlon-direct,athlon-fpsched,athlon-fmul") 1092132718Skan(define_insn_reservation "athlon_ssemulvector_load" 5 1093132718Skan (and (eq_attr "cpu" "athlon") 1094132718Skan (and (eq_attr "type" "ssemul") 1095132718Skan (eq_attr "memory" "load"))) 1096132718Skan "athlon-vector,athlon-fpload2,(athlon-fmul*2)") 1097132718Skan(define_insn_reservation "athlon_ssemulvector_load_k8" 7 1098169689Skan (and (eq_attr "cpu" "k8,generic64") 1099132718Skan (and (eq_attr "type" "ssemul") 1100132718Skan (eq_attr "memory" "load"))) 1101132718Skan "athlon-double,athlon-fpload2k8,(athlon-fmul*2)") 1102251212Spfg(define_insn_reservation "athlon_ssemulvector_load_amdfam10" 6 1103251212Spfg (and (eq_attr "cpu" "amdfam10") 1104251212Spfg (and (eq_attr "type" "ssemul") 1105251212Spfg (eq_attr "memory" "load"))) 1106251212Spfg "athlon-direct,athlon-fploadk8,athlon-fmul") 1107132718Skan(define_insn_reservation "athlon_ssemulvector" 5 1108132718Skan (and (eq_attr "cpu" "athlon") 1109132718Skan (eq_attr "type" "ssemul")) 1110132718Skan "athlon-vector,athlon-fpsched,(athlon-fmul*2)") 1111132718Skan(define_insn_reservation "athlon_ssemulvector_k8" 5 1112169689Skan (and (eq_attr "cpu" "k8,generic64") 1113132718Skan (eq_attr "type" "ssemul")) 1114132718Skan "athlon-double,athlon-fpsched,(athlon-fmul*2)") 1115251212Spfg(define_insn_reservation "athlon_ssemulvector_amdfam10" 4 1116251212Spfg (and (eq_attr "cpu" "amdfam10") 1117251212Spfg (eq_attr "type" "ssemul")) 1118251212Spfg "athlon-direct,athlon-fpsched,athlon-fmul") 1119132718Skan;; divsd timings. divss is faster 1120132718Skan(define_insn_reservation "athlon_ssediv_load" 20 1121132718Skan (and (eq_attr "cpu" "athlon") 1122132718Skan (and (eq_attr "type" "ssediv") 1123132718Skan (and (eq_attr "mode" "SF,DF") 1124132718Skan (eq_attr "memory" "load")))) 1125132718Skan "athlon-direct,athlon-fpload,athlon-fmul*17") 1126132718Skan(define_insn_reservation "athlon_ssediv_load_k8" 22 1127251212Spfg (and (eq_attr "cpu" "k8,generic64,amdfam10") 1128132718Skan (and (eq_attr "type" "ssediv") 1129132718Skan (and (eq_attr "mode" "SF,DF") 1130132718Skan (eq_attr "memory" "load")))) 1131132718Skan "athlon-direct,athlon-fploadk8,athlon-fmul*17") 1132132718Skan(define_insn_reservation "athlon_ssediv" 20 1133251212Spfg (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10") 1134132718Skan (and (eq_attr "type" "ssediv") 1135132718Skan (eq_attr "mode" "SF,DF"))) 1136132718Skan "athlon-direct,athlon-fpsched,athlon-fmul*17") 1137132718Skan(define_insn_reservation "athlon_ssedivvector_load" 39 1138132718Skan (and (eq_attr "cpu" "athlon") 1139132718Skan (and (eq_attr "type" "ssediv") 1140132718Skan (eq_attr "memory" "load"))) 1141132718Skan "athlon-vector,athlon-fpload2,athlon-fmul*34") 1142132718Skan(define_insn_reservation "athlon_ssedivvector_load_k8" 35 1143169689Skan (and (eq_attr "cpu" "k8,generic64") 1144132718Skan (and (eq_attr "type" "ssediv") 1145132718Skan (eq_attr "memory" "load"))) 1146132718Skan "athlon-double,athlon-fpload2k8,athlon-fmul*34") 1147251212Spfg(define_insn_reservation "athlon_ssedivvector_load_amdfam10" 22 1148251212Spfg (and (eq_attr "cpu" "amdfam10") 1149251212Spfg (and (eq_attr "type" "ssediv") 1150251212Spfg (eq_attr "memory" "load"))) 1151251212Spfg "athlon-direct,athlon-fploadk8,athlon-fmul*17") 1152132718Skan(define_insn_reservation "athlon_ssedivvector" 39 1153132718Skan (and (eq_attr "cpu" "athlon") 1154132718Skan (eq_attr "type" "ssediv")) 1155132718Skan "athlon-vector,athlon-fmul*34") 1156132718Skan(define_insn_reservation "athlon_ssedivvector_k8" 39 1157169689Skan (and (eq_attr "cpu" "k8,generic64") 1158132718Skan (eq_attr "type" "ssediv")) 1159132718Skan "athlon-double,athlon-fmul*34") 1160251212Spfg(define_insn_reservation "athlon_ssedivvector_amdfam10" 20 1161251212Spfg (and (eq_attr "cpu" "amdfam10") 1162251212Spfg (eq_attr "type" "ssediv")) 1163251212Spfg "athlon-direct,athlon-fmul*17") 1164251212Spfg(define_insn_reservation "athlon_sseins_amdfam10" 5 1165251212Spfg (and (eq_attr "cpu" "amdfam10") 1166251212Spfg (and (eq_attr "type" "sseins") 1167251212Spfg (eq_attr "mode" "TI"))) 1168251212Spfg "athlon-vector,athlon-fpsched,athlon-faddmul") 1169