31a32,33
> (define_attr "amdfam10_decode" "direct,vector,double"
> (const_string "direct"))
134c136
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
140a143,146
> (define_insn_reservation "athlon_call_amdfam10" 0
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "call,callv"))
> "athlon-double,athlon-ieu")
145c151
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
155a162,165
> (define_insn_reservation "athlon_pop_amdfam10" 3
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "pop"))
> "athlon-direct,(athlon-ieu+athlon-load)")
161c171
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
169a180,184
> ;; Lea executes in AGU unit with 1 cycle latency on AMDFAM10
> (define_insn_reservation "athlon_lea_amdfam10" 1
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "lea"))
> "athlon-direct,athlon-agu,nothing")
179c194
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
185c200
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
188a204,209
> (define_insn_reservation "athlon_imul_amdfam10_HI" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "imul")
> (and (eq_attr "mode" "HI")
> (eq_attr "memory" "none,unknown"))))
> "athlon-vector,athlon-ieu0,athlon-mult,nothing,athlon-ieu0")
195c216
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
201c222
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
211a233
> ;; Using the same heuristics for amdfam10 as K8 with idiv
214c236
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
219c241
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
224a247
> ;; Using the same heuristics for amdfam10 as K8 with idiv
226c249
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
236a260,265
> (define_insn_reservation "athlon_idirect_amdfam10" 1
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "none,unknown"))))
> "athlon-direct,athlon-ieu")
242a272,278
> (define_insn_reservation "athlon_ivector_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "none,unknown"))))
> "athlon-vector,athlon-ieu,athlon-ieu")
>
244c280
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
247a284
>
253a291,296
> (define_insn_reservation "athlon_idirect_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "load"))))
> "athlon-direct,athlon-load,athlon-ieu")
259a303,309
> (define_insn_reservation "athlon_ivector_load_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "load"))))
> "athlon-vector,athlon-load,athlon-ieu,athlon-ieu")
>
261c311
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
264a315
>
272a324,332
> (define_insn_reservation "athlon_idirect_both_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "both"))))
> "athlon-direct,athlon-load,
> athlon-ieu,athlon-store,
> athlon-store")
>
281a342,351
> (define_insn_reservation "athlon_ivector_both_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "both"))))
> "athlon-vector,athlon-load,
> athlon-ieu,
> athlon-ieu,
> athlon-store")
>
288a359,366
> (define_insn_reservation "athlon_idirect_store_amdfam10" 1
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "store"))))
> "athlon-direct,(athlon-ieu+athlon-agu),
> athlon-store")
>
295a374,380
> (define_insn_reservation "athlon_ivector_store_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "store"))))
> "athlon-vector,(athlon-ieu+athlon-agu),athlon-ieu,
> athlon-store")
305c390
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
317c402
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
329c414
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
340c425
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
345c430
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
349c434
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
358c443
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
363c448
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
372c457
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
377c462
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
381c466
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
390c475
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
399c484
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
403c488
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
408c493
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
421c506
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
426c511
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
437c522
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
443c528
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
453c538
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
458c543
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
464c549
< ; (and (eq_attr "cpu" "athlon,k8,generic64")
---
> ; (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
518a604,620
> ;; On AMDFAM10 all double, single and integer packed and scalar SSEx data
> ;; loads generated are direct path, latency of 2 and do not use any FP
> ;; executions units. No seperate entries for movlpx/movhpx loads, which
> ;; are direct path, latency of 4 and use the FADD/FMUL FP execution units,
> ;; as they will not be generated.
> (define_insn_reservation "athlon_sseld_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssemov")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8")
> ;; On AMDFAM10 MMX data loads generated are direct path, latency of 4
> ;; and can use any FP executions units
> (define_insn_reservation "athlon_mmxld_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "mmxmov")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8, athlon-fany")
535a638,656
> ;; On AMDFAM10 all double, single and integer packed SSEx data stores
> ;; generated are all double path, latency of 2 and use the FSTORE FP
> ;; execution unit. No entries seperate for movupx/movdqu, which are
> ;; vector path, latency of 3 and use the FSTORE*2 FP execution unit,
> ;; as they will not be generated.
> (define_insn_reservation "athlon_ssest_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssemov")
> (and (eq_attr "mode" "V4SF,V2DF,TI")
> (eq_attr "memory" "store,both"))))
> "athlon-double,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store)*2)")
> ;; On AMDFAM10 all double, single and integer scalar SSEx and MMX
> ;; data stores generated are all direct path, latency of 2 and use
> ;; the FSTORE FP execution unit
> (define_insn_reservation "athlon_mmxssest_short_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "mmxmov,ssemov")
> (eq_attr "memory" "store,both")))
> "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
580a702,706
> (define_insn_reservation "athlon_sselog_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sselog,sselog1")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,(athlon-fadd|athlon-fmul)")
588a715,719
> (define_insn_reservation "athlon_sselog_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "sselog,sselog1"))
> "athlon-direct,athlon-fpsched,(athlon-fadd|athlon-fmul)")
>
597c728
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
603c734
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
616a748,752
> (define_insn_reservation "athlon_ssecmpvector_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecmp")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fadd")
624a761,764
> (define_insn_reservation "athlon_ssecmpvector_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "ssecmp"))
> "athlon-direct,athlon-fpsched,athlon-fadd")
634a775,779
> (define_insn_reservation "athlon_ssecomi_load_amdfam10" 5
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecomi")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fadd")
638a784,788
> (define_insn_reservation "athlon_ssecomi_amdfam10" 3
> (and (eq_attr "cpu" "amdfam10")
> ;; It seems athlon_ssecomi has a bug in the attr_type, fixed for amdfam10
> (eq_attr "type" "ssecomi"))
> "athlon-direct,athlon-fpsched,athlon-fadd")
646c796
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
652c802
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
665a816,820
> (define_insn_reservation "athlon_sseaddvector_load_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseadd")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fadd")
673a829,832
> (define_insn_reservation "athlon_sseaddvector_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "sseadd"))
> "athlon-direct,athlon-fpsched,athlon-fadd")
686a846,852
> (define_insn_reservation "athlon_ssecvt_cvtss2sd_load_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "DF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
692a859,864
> (define_insn_reservation "athlon_ssecvt_cvtss2sd_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (eq_attr "mode" "DF"))))
> "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
700a873,879
> (define_insn_reservation "athlon_ssecvt_cvtps2pd_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "mode" "V2DF,V4SF,TI")
> (eq_attr "memory" "load")))))
> "athlon-direct,athlon-fploadk8,athlon-fstore")
706a886,891
> (define_insn_reservation "athlon_ssecvt_cvtps2pd_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "direct")
> (eq_attr "mode" "V2DF,V4SF,TI"))))
> "athlon-direct,athlon-fpsched,athlon-fstore")
715a901,907
> (define_insn_reservation "athlon_sseicvt_cvtsi2sd_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
730a923,929
> (define_insn_reservation "athlon_sseicvt_cvtsi2ss_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
738a938,944
> (define_insn_reservation "athlon_sseicvt_cvtsi2sd_amdfam10" 14
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "none")))))
> "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
746a953,959
> (define_insn_reservation "athlon_sseicvt_cvtsi2ss_amdfam10" 14
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "none")))))
> "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
754a968,974
> (define_insn_reservation "athlon_ssecvt_cvtsd2ss_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
762a983,989
> (define_insn_reservation "athlon_ssecvt_cvtsd2ss_amdfam10" 8
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "mode" "SF")
> (eq_attr "memory" "none")))))
> "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
769a997,1003
> (define_insn_reservation "athlon_ssecvt_cvtpd2ps_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "V4SF,V2DF,TI")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
778a1013,1019
> (define_insn_reservation "athlon_ssecvt_cvtpd2ps_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "V4SF,V2DF,TI")
> (eq_attr "memory" "none")))))
> "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)")
786a1028,1034
> (define_insn_reservation "athlon_secvt_cvtsX2si_load_amdfam10" 10
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SI,DI")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-fadd+athlon-fstore)")
801a1050,1072
> (define_insn_reservation "athlon_ssecvt_cvtsX2si_amdfam10" 8
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SI,DI")
> (eq_attr "memory" "none")))))
> "athlon-double,athlon-fpsched,(athlon-fadd+athlon-fstore)")
> ;; cvtpd2dq reg,mem is doublepath, troughput 1, latency 9 on amdfam10
> (define_insn_reservation "athlon_sseicvt_cvtpd2dq_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "TI")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
> ;; cvtpd2dq reg,mem is doublepath, troughput 1, latency 7 on amdfam10
> (define_insn_reservation "athlon_sseicvt_cvtpd2dq_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "TI")
> (eq_attr "memory" "none")))))
> "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)")
811c1082
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
817c1088
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
830a1102,1106
> (define_insn_reservation "athlon_ssemulvector_load_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssemul")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fmul")
838a1115,1118
> (define_insn_reservation "athlon_ssemulvector_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "ssemul"))
> "athlon-direct,athlon-fpsched,athlon-fmul")
847c1127
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
853c1133
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
866a1147,1151
> (define_insn_reservation "athlon_ssedivvector_load_amdfam10" 22
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssediv")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fmul*17")
874a1160,1168
> (define_insn_reservation "athlon_ssedivvector_amdfam10" 20
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "ssediv"))
> "athlon-direct,athlon-fmul*17")
> (define_insn_reservation "athlon_sseins_amdfam10" 5
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseins")
> (eq_attr "mode" "TI")))
> "athlon-vector,athlon-fpsched,athlon-faddmul")
> (define_attr "amdfam10_decode" "direct,vector,double"
> (const_string "direct"))
134c136
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
140a143,146
> (define_insn_reservation "athlon_call_amdfam10" 0
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "call,callv"))
> "athlon-double,athlon-ieu")
145c151
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
155a162,165
> (define_insn_reservation "athlon_pop_amdfam10" 3
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "pop"))
> "athlon-direct,(athlon-ieu+athlon-load)")
161c171
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
169a180,184
> ;; Lea executes in AGU unit with 1 cycle latency on AMDFAM10
> (define_insn_reservation "athlon_lea_amdfam10" 1
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "lea"))
> "athlon-direct,athlon-agu,nothing")
179c194
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
185c200
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
188a204,209
> (define_insn_reservation "athlon_imul_amdfam10_HI" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "imul")
> (and (eq_attr "mode" "HI")
> (eq_attr "memory" "none,unknown"))))
> "athlon-vector,athlon-ieu0,athlon-mult,nothing,athlon-ieu0")
195c216
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
201c222
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
211a233
> ;; Using the same heuristics for amdfam10 as K8 with idiv
214c236
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
219c241
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
224a247
> ;; Using the same heuristics for amdfam10 as K8 with idiv
226c249
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
236a260,265
> (define_insn_reservation "athlon_idirect_amdfam10" 1
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "none,unknown"))))
> "athlon-direct,athlon-ieu")
242a272,278
> (define_insn_reservation "athlon_ivector_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "none,unknown"))))
> "athlon-vector,athlon-ieu,athlon-ieu")
>
244c280
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
247a284
>
253a291,296
> (define_insn_reservation "athlon_idirect_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "load"))))
> "athlon-direct,athlon-load,athlon-ieu")
259a303,309
> (define_insn_reservation "athlon_ivector_load_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "load"))))
> "athlon-vector,athlon-load,athlon-ieu,athlon-ieu")
>
261c311
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
264a315
>
272a324,332
> (define_insn_reservation "athlon_idirect_both_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "both"))))
> "athlon-direct,athlon-load,
> athlon-ieu,athlon-store,
> athlon-store")
>
281a342,351
> (define_insn_reservation "athlon_ivector_both_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "both"))))
> "athlon-vector,athlon-load,
> athlon-ieu,
> athlon-ieu,
> athlon-store")
>
288a359,366
> (define_insn_reservation "athlon_idirect_store_amdfam10" 1
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "store"))))
> "athlon-direct,(athlon-ieu+athlon-agu),
> athlon-store")
>
295a374,380
> (define_insn_reservation "athlon_ivector_store_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "unit" "integer,unknown")
> (eq_attr "memory" "store"))))
> "athlon-vector,(athlon-ieu+athlon-agu),athlon-ieu,
> athlon-store")
305c390
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
317c402
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
329c414
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
340c425
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
345c430
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
349c434
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
358c443
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
363c448
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
372c457
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
377c462
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
381c466
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
390c475
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
399c484
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
403c488
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
408c493
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
421c506
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
426c511
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
437c522
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
443c528
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
453c538
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
458c543
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
464c549
< ; (and (eq_attr "cpu" "athlon,k8,generic64")
---
> ; (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
518a604,620
> ;; On AMDFAM10 all double, single and integer packed and scalar SSEx data
> ;; loads generated are direct path, latency of 2 and do not use any FP
> ;; executions units. No seperate entries for movlpx/movhpx loads, which
> ;; are direct path, latency of 4 and use the FADD/FMUL FP execution units,
> ;; as they will not be generated.
> (define_insn_reservation "athlon_sseld_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssemov")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8")
> ;; On AMDFAM10 MMX data loads generated are direct path, latency of 4
> ;; and can use any FP executions units
> (define_insn_reservation "athlon_mmxld_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "mmxmov")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8, athlon-fany")
535a638,656
> ;; On AMDFAM10 all double, single and integer packed SSEx data stores
> ;; generated are all double path, latency of 2 and use the FSTORE FP
> ;; execution unit. No entries seperate for movupx/movdqu, which are
> ;; vector path, latency of 3 and use the FSTORE*2 FP execution unit,
> ;; as they will not be generated.
> (define_insn_reservation "athlon_ssest_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssemov")
> (and (eq_attr "mode" "V4SF,V2DF,TI")
> (eq_attr "memory" "store,both"))))
> "athlon-double,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store)*2)")
> ;; On AMDFAM10 all double, single and integer scalar SSEx and MMX
> ;; data stores generated are all direct path, latency of 2 and use
> ;; the FSTORE FP execution unit
> (define_insn_reservation "athlon_mmxssest_short_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "mmxmov,ssemov")
> (eq_attr "memory" "store,both")))
> "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
580a702,706
> (define_insn_reservation "athlon_sselog_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sselog,sselog1")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,(athlon-fadd|athlon-fmul)")
588a715,719
> (define_insn_reservation "athlon_sselog_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "sselog,sselog1"))
> "athlon-direct,athlon-fpsched,(athlon-fadd|athlon-fmul)")
>
597c728
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
603c734
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
616a748,752
> (define_insn_reservation "athlon_ssecmpvector_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecmp")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fadd")
624a761,764
> (define_insn_reservation "athlon_ssecmpvector_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "ssecmp"))
> "athlon-direct,athlon-fpsched,athlon-fadd")
634a775,779
> (define_insn_reservation "athlon_ssecomi_load_amdfam10" 5
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecomi")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fadd")
638a784,788
> (define_insn_reservation "athlon_ssecomi_amdfam10" 3
> (and (eq_attr "cpu" "amdfam10")
> ;; It seems athlon_ssecomi has a bug in the attr_type, fixed for amdfam10
> (eq_attr "type" "ssecomi"))
> "athlon-direct,athlon-fpsched,athlon-fadd")
646c796
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
652c802
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
665a816,820
> (define_insn_reservation "athlon_sseaddvector_load_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseadd")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fadd")
673a829,832
> (define_insn_reservation "athlon_sseaddvector_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "sseadd"))
> "athlon-direct,athlon-fpsched,athlon-fadd")
686a846,852
> (define_insn_reservation "athlon_ssecvt_cvtss2sd_load_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "DF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
692a859,864
> (define_insn_reservation "athlon_ssecvt_cvtss2sd_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (eq_attr "mode" "DF"))))
> "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
700a873,879
> (define_insn_reservation "athlon_ssecvt_cvtps2pd_load_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "direct")
> (and (eq_attr "mode" "V2DF,V4SF,TI")
> (eq_attr "memory" "load")))))
> "athlon-direct,athlon-fploadk8,athlon-fstore")
706a886,891
> (define_insn_reservation "athlon_ssecvt_cvtps2pd_amdfam10" 2
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "direct")
> (eq_attr "mode" "V2DF,V4SF,TI"))))
> "athlon-direct,athlon-fpsched,athlon-fstore")
715a901,907
> (define_insn_reservation "athlon_sseicvt_cvtsi2sd_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
730a923,929
> (define_insn_reservation "athlon_sseicvt_cvtsi2ss_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
738a938,944
> (define_insn_reservation "athlon_sseicvt_cvtsi2sd_amdfam10" 14
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "none")))))
> "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
746a953,959
> (define_insn_reservation "athlon_sseicvt_cvtsi2ss_amdfam10" 14
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "mode" "SF,DF")
> (eq_attr "memory" "none")))))
> "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
754a968,974
> (define_insn_reservation "athlon_ssecvt_cvtsd2ss_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SF")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
762a983,989
> (define_insn_reservation "athlon_ssecvt_cvtsd2ss_amdfam10" 8
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "vector")
> (and (eq_attr "mode" "SF")
> (eq_attr "memory" "none")))))
> "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
769a997,1003
> (define_insn_reservation "athlon_ssecvt_cvtpd2ps_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "V4SF,V2DF,TI")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
778a1013,1019
> (define_insn_reservation "athlon_ssecvt_cvtpd2ps_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssecvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "V4SF,V2DF,TI")
> (eq_attr "memory" "none")))))
> "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)")
786a1028,1034
> (define_insn_reservation "athlon_secvt_cvtsX2si_load_amdfam10" 10
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SI,DI")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-fadd+athlon-fstore)")
801a1050,1072
> (define_insn_reservation "athlon_ssecvt_cvtsX2si_amdfam10" 8
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "SI,DI")
> (eq_attr "memory" "none")))))
> "athlon-double,athlon-fpsched,(athlon-fadd+athlon-fstore)")
> ;; cvtpd2dq reg,mem is doublepath, troughput 1, latency 9 on amdfam10
> (define_insn_reservation "athlon_sseicvt_cvtpd2dq_load_amdfam10" 9
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "TI")
> (eq_attr "memory" "load")))))
> "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
> ;; cvtpd2dq reg,mem is doublepath, troughput 1, latency 7 on amdfam10
> (define_insn_reservation "athlon_sseicvt_cvtpd2dq_amdfam10" 7
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseicvt")
> (and (eq_attr "amdfam10_decode" "double")
> (and (eq_attr "mode" "TI")
> (eq_attr "memory" "none")))))
> "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)")
811c1082
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
817c1088
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
830a1102,1106
> (define_insn_reservation "athlon_ssemulvector_load_amdfam10" 6
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssemul")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fmul")
838a1115,1118
> (define_insn_reservation "athlon_ssemulvector_amdfam10" 4
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "ssemul"))
> "athlon-direct,athlon-fpsched,athlon-fmul")
847c1127
< (and (eq_attr "cpu" "k8,generic64")
---
> (and (eq_attr "cpu" "k8,generic64,amdfam10")
853c1133
< (and (eq_attr "cpu" "athlon,k8,generic64")
---
> (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
866a1147,1151
> (define_insn_reservation "athlon_ssedivvector_load_amdfam10" 22
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "ssediv")
> (eq_attr "memory" "load")))
> "athlon-direct,athlon-fploadk8,athlon-fmul*17")
874a1160,1168
> (define_insn_reservation "athlon_ssedivvector_amdfam10" 20
> (and (eq_attr "cpu" "amdfam10")
> (eq_attr "type" "ssediv"))
> "athlon-direct,athlon-fmul*17")
> (define_insn_reservation "athlon_sseins_amdfam10" 5
> (and (eq_attr "cpu" "amdfam10")
> (and (eq_attr "type" "sseins")
> (eq_attr "mode" "TI")))
> "athlon-vector,athlon-fpsched,athlon-faddmul")