This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Drop generic32 cost model


Hi,
when generic model was introduced, the 32bit only CPUs was still common on the
market.  It would be stupid to tune 64bit code for CPUs that will never run it.
We thus introduced two models - generic32 that was considering needs
of 32bit cpus (centrinos in particular) and generic64 that didn't.

 /* Generic32 should produce code tuned for PPro, Pentium4, Nocona,
    Athlon and K8.  */
 /* Generic64 should produce code tuned for Nocona and K8.  */

Was original definitions that are still in the source.

Today the 32bit only CPUs are no longer important.  This patch thus
drops 32bit generic.  This has effect of droping the following flags
for generic at -m32:
 use_leave, avoid_vector_decode, slow_imul_imm32_mem, slow_imul_imm8
that are currently enabled for generic64 only.  This was to accomodate
earlier AMD chips that are no longer relevant too.

I also updated comment:
! /* Generic64 should produce code tuned for Nocona and K8.  */
to:
! /* Generic should produce code tuned for Core-i7 (and newer chips)
!    and btver1 (and newer chips).  */
This is what I think generic represents today (it also fares swell on earlier
cores and amdfam10, but we probably don't want to get too limited by these
anymore).

I would like to proceed with modernization of generic64 - in particular
to switch it to 4 issue scheduling model and revisit individual flags
incrementally.

Bootstrapped/regtested x86_64-linux, will commit it tomorrow if there
are no complains.

Honza

	* i386.h (TARGET_GENERIC32, TARGET_GENERIC64): Remove.
	(TARGET_GENERIC): Use PROCESOR_GENERIC
	(enum processor_type): Unify generic32 and 64.
	* i386.md (cpu): Likewise.
	* x86-tune.def (use_leave): Enable for generic32.
	(avoid_vector_decode, slow_imul_imm32_mem, slow_imul_imm8): Likewise.
	* athlon.md: Change generic64 to generic in all occurences.
	* i386-c.c (ix86_target_macros_internal): Unify generic64 and 32.
	(ix86_target_macros_internal): Likewise.
	* driver-i386.c (host_detect_local_cpu): Likewise.
	* i386.c (generic64_memcpy, generic64_memset, generic64_cost): Rename to ..
	(generic_memcpy, generic_memset, generic_cost): This one.
	(generic32_memcpy, generic32_memset, generic32_cost): Remove.
	(m_GENERIC32, m_GENERIC64): Remove.
	(m_GENERIC): Turn into one flag.
	(processor_target): Unify generic tunnings.
	(ix86_option_override_internal): Replace generic32/64 by generic.
	(ix86_issue_rate): Likewise.
	(ix86_adjust_cost): Likewise.
Index: config/i386/i386.h
===================================================================
*** config/i386/i386.h	(revision 202681)
--- config/i386/i386.h	(working copy)
*************** extern const struct processor_costs ix86
*** 251,259 ****
  #define TARGET_CORE2 (ix86_tune == PROCESSOR_CORE2)
  #define TARGET_COREI7 (ix86_tune == PROCESSOR_COREI7)
  #define TARGET_HASWELL (ix86_tune == PROCESSOR_HASWELL)
! #define TARGET_GENERIC32 (ix86_tune == PROCESSOR_GENERIC32)
! #define TARGET_GENERIC64 (ix86_tune == PROCESSOR_GENERIC64)
! #define TARGET_GENERIC (TARGET_GENERIC32 || TARGET_GENERIC64)
  #define TARGET_AMDFAM10 (ix86_tune == PROCESSOR_AMDFAM10)
  #define TARGET_BDVER1 (ix86_tune == PROCESSOR_BDVER1)
  #define TARGET_BDVER2 (ix86_tune == PROCESSOR_BDVER2)
--- 251,257 ----
  #define TARGET_CORE2 (ix86_tune == PROCESSOR_CORE2)
  #define TARGET_COREI7 (ix86_tune == PROCESSOR_COREI7)
  #define TARGET_HASWELL (ix86_tune == PROCESSOR_HASWELL)
! #define TARGET_GENERIC (ix86_tune == PROCESSOR_GENERIC)
  #define TARGET_AMDFAM10 (ix86_tune == PROCESSOR_AMDFAM10)
  #define TARGET_BDVER1 (ix86_tune == PROCESSOR_BDVER1)
  #define TARGET_BDVER2 (ix86_tune == PROCESSOR_BDVER2)
*************** enum processor_type
*** 2141,2148 ****
    PROCESSOR_CORE2,
    PROCESSOR_COREI7,
    PROCESSOR_HASWELL,
!   PROCESSOR_GENERIC32,
!   PROCESSOR_GENERIC64,
    PROCESSOR_AMDFAM10,
    PROCESSOR_BDVER1,
    PROCESSOR_BDVER2,
--- 2139,2145 ----
    PROCESSOR_CORE2,
    PROCESSOR_COREI7,
    PROCESSOR_HASWELL,
!   PROCESSOR_GENERIC,
    PROCESSOR_AMDFAM10,
    PROCESSOR_BDVER1,
    PROCESSOR_BDVER2,
Index: config/i386/i386.md
===================================================================
*** config/i386/i386.md	(revision 202681)
--- config/i386/i386.md	(working copy)
***************
*** 349,355 ****
  
  ;; Processor type.
  (define_attr "cpu" "none,pentium,pentiumpro,geode,k6,athlon,k8,core2,corei7,
! 		    atom,slm,generic64,amdfam10,bdver1,bdver2,bdver3,btver1,btver2"
    (const (symbol_ref "ix86_schedule")))
  
  ;; A basic instruction type.  Refinements due to arguments to be
--- 349,355 ----
  
  ;; Processor type.
  (define_attr "cpu" "none,pentium,pentiumpro,geode,k6,athlon,k8,core2,corei7,
! 		    atom,slm,generic,amdfam10,bdver1,bdver2,bdver3,btver1,btver2"
    (const (symbol_ref "ix86_schedule")))
  
  ;; A basic instruction type.  Refinements due to arguments to be
Index: config/i386/x86-tune.def
===================================================================
*** config/i386/x86-tune.def	(revision 202681)
--- config/i386/x86-tune.def	(working copy)
*************** see the files COPYING3 and COPYING.RUNTI
*** 23,29 ****
     tradeoff.  We can't enable it for 32bit generic because it does not
     work well with PPro base chips.  */
  DEF_TUNE (X86_TUNE_USE_LEAVE, "use_leave", 
! 	  m_386 | m_CORE_ALL | m_K6_GEODE | m_AMD_MULTIPLE | m_GENERIC64)
  DEF_TUNE (X86_TUNE_PUSH_MEMORY, "push_memory", 
            m_386 | m_P4_NOCONA | m_CORE_ALL | m_K6_GEODE | m_AMD_MULTIPLE 
            | m_GENERIC)
--- 23,29 ----
     tradeoff.  We can't enable it for 32bit generic because it does not
     work well with PPro base chips.  */
  DEF_TUNE (X86_TUNE_USE_LEAVE, "use_leave", 
! 	  m_386 | m_CORE_ALL | m_K6_GEODE | m_AMD_MULTIPLE | m_GENERIC)
  DEF_TUNE (X86_TUNE_PUSH_MEMORY, "push_memory", 
            m_386 | m_P4_NOCONA | m_CORE_ALL | m_K6_GEODE | m_AMD_MULTIPLE 
            | m_GENERIC)
*************** DEF_TUNE (X86_TUNE_MOVX, "movx",
*** 49,58 ****
     register stalls on Generic32 compilation setting as well.  However
     in current implementation the partial register stalls are not eliminated
     very well - they can be introduced via subregs synthesized by combine
!    and can happen in caller/callee saving sequences.  Because this option
!    pays back little on PPro based chips and is in conflict with partial reg
!    dependencies used by Athlon/P4 based chips, it is better to leave it off
!    for generic32 for now.  */
  DEF_TUNE (X86_TUNE_PARTIAL_REG_STALL, "partial_reg_stall", m_PPRO)
  DEF_TUNE (X86_TUNE_PARTIAL_FLAG_REG_STALL, "partial_flag_reg_stall",
            m_CORE_ALL | m_GENERIC)
--- 49,55 ----
     register stalls on Generic32 compilation setting as well.  However
     in current implementation the partial register stalls are not eliminated
     very well - they can be introduced via subregs synthesized by combine
!    and can happen in caller/callee saving sequences.  */
  DEF_TUNE (X86_TUNE_PARTIAL_REG_STALL, "partial_reg_stall", m_PPRO)
  DEF_TUNE (X86_TUNE_PARTIAL_FLAG_REG_STALL, "partial_flag_reg_stall",
            m_CORE_ALL | m_GENERIC)
*************** DEF_TUNE (X86_TUNE_EXT_80387_CONSTANTS,
*** 163,169 ****
            m_PPRO | m_P4_NOCONA | m_CORE_ALL | m_ATOM | m_SLM | m_K6_GEODE
            | m_ATHLON_K8 | m_GENERIC)
  DEF_TUNE (X86_TUNE_AVOID_VECTOR_DECODE, "avoid_vector_decode",
!           m_CORE_ALL | m_K8 | m_GENERIC64)
  /* X86_TUNE_PROMOTE_HIMODE_IMUL: Modern CPUs have same latency for HImode
     and SImode multiply, but 386 and 486 do HImode multiply faster.  */
  DEF_TUNE (X86_TUNE_PROMOTE_HIMODE_IMUL, "promote_himode_imul",
--- 160,166 ----
            m_PPRO | m_P4_NOCONA | m_CORE_ALL | m_ATOM | m_SLM | m_K6_GEODE
            | m_ATHLON_K8 | m_GENERIC)
  DEF_TUNE (X86_TUNE_AVOID_VECTOR_DECODE, "avoid_vector_decode",
!           m_CORE_ALL | m_K8 | m_GENERIC)
  /* X86_TUNE_PROMOTE_HIMODE_IMUL: Modern CPUs have same latency for HImode
     and SImode multiply, but 386 and 486 do HImode multiply faster.  */
  DEF_TUNE (X86_TUNE_PROMOTE_HIMODE_IMUL, "promote_himode_imul",
*************** DEF_TUNE (X86_TUNE_PROMOTE_HIMODE_IMUL,
*** 171,181 ****
  /* X86_TUNE_SLOW_IMUL_IMM32_MEM: Imul of 32-bit constant and memory is
     vector path on AMD machines.  */
  DEF_TUNE (X86_TUNE_SLOW_IMUL_IMM32_MEM, "slow_imul_imm32_mem",
!           m_CORE_ALL | m_K8 | m_AMDFAM10 | m_BDVER | m_BTVER | m_GENERIC64)
  /* X86_TUNE_SLOW_IMUL_IMM8: Imul of 8-bit constant is vector path on AMD
     machines.  */
  DEF_TUNE (X86_TUNE_SLOW_IMUL_IMM8, "slow_imul_imm8",
!           m_CORE_ALL | m_K8 | m_AMDFAM10 | m_BDVER | m_BTVER | m_GENERIC64)
  /* X86_TUNE_MOVE_M1_VIA_OR: On pentiums, it is faster to load -1 via OR
     than a MOV.  */
  DEF_TUNE (X86_TUNE_MOVE_M1_VIA_OR, "move_m1_via_or", m_PENT)
--- 168,178 ----
  /* X86_TUNE_SLOW_IMUL_IMM32_MEM: Imul of 32-bit constant and memory is
     vector path on AMD machines.  */
  DEF_TUNE (X86_TUNE_SLOW_IMUL_IMM32_MEM, "slow_imul_imm32_mem",
!           m_CORE_ALL | m_K8 | m_AMDFAM10 | m_BDVER | m_BTVER | m_GENERIC)
  /* X86_TUNE_SLOW_IMUL_IMM8: Imul of 8-bit constant is vector path on AMD
     machines.  */
  DEF_TUNE (X86_TUNE_SLOW_IMUL_IMM8, "slow_imul_imm8",
!           m_CORE_ALL | m_K8 | m_AMDFAM10 | m_BDVER | m_BTVER | m_GENERIC)
  /* X86_TUNE_MOVE_M1_VIA_OR: On pentiums, it is faster to load -1 via OR
     than a MOV.  */
  DEF_TUNE (X86_TUNE_MOVE_M1_VIA_OR, "move_m1_via_or", m_PENT)
Index: config/i386/athlon.md
===================================================================
*** config/i386/athlon.md	(revision 202681)
--- config/i386/athlon.md	(working copy)
***************
*** 151,161 ****
  
  ;; Jump instructions are executed in the branch unit completely transparent to us
  (define_insn_reservation "athlon_branch" 0
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "ibr"))
  			 "athlon-direct,athlon-ieu")
  (define_insn_reservation "athlon_call" 0
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "type" "call,callv"))
  			 "athlon-vector,athlon-ieu")
  (define_insn_reservation "athlon_call_amdfam10" 0
--- 151,161 ----
  
  ;; Jump instructions are executed in the branch unit completely transparent to us
  (define_insn_reservation "athlon_branch" 0
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "ibr"))
  			 "athlon-direct,athlon-ieu")
  (define_insn_reservation "athlon_call" 0
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "type" "call,callv"))
  			 "athlon-vector,athlon-ieu")
  (define_insn_reservation "athlon_call_amdfam10" 0
***************
*** 166,180 ****
  ;; Latency of push operation is 3 cycles, but ESP value is available
  ;; earlier
  (define_insn_reservation "athlon_push" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "push"))
  			 "athlon-direct,athlon-agu,athlon-store")
  (define_insn_reservation "athlon_pop" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "type" "pop"))
  			 "athlon-vector,athlon-load,athlon-ieu")
  (define_insn_reservation "athlon_pop_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (eq_attr "type" "pop"))
  			 "athlon-double,(athlon-ieu+athlon-load)")
  (define_insn_reservation "athlon_pop_amdfam10" 3
--- 166,180 ----
  ;; Latency of push operation is 3 cycles, but ESP value is available
  ;; earlier
  (define_insn_reservation "athlon_push" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "push"))
  			 "athlon-direct,athlon-agu,athlon-store")
  (define_insn_reservation "athlon_pop" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "type" "pop"))
  			 "athlon-vector,athlon-load,athlon-ieu")
  (define_insn_reservation "athlon_pop_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (eq_attr "type" "pop"))
  			 "athlon-double,(athlon-ieu+athlon-load)")
  (define_insn_reservation "athlon_pop_amdfam10" 3
***************
*** 186,198 ****
  			      (eq_attr "type" "leave"))
  			 "athlon-vector,(athlon-ieu+athlon-load)")
  (define_insn_reservation "athlon_leave_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (eq_attr "type" "leave"))
  			 "athlon-double,(athlon-ieu+athlon-load)")
  
  ;; Lea executes in AGU unit with 2 cycles latency.
  (define_insn_reservation "athlon_lea" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "type" "lea"))
  			 "athlon-direct,athlon-agu,nothing")
  ;; Lea executes in AGU unit with 1 cycle latency on AMDFAM10
--- 186,198 ----
  			      (eq_attr "type" "leave"))
  			 "athlon-vector,(athlon-ieu+athlon-load)")
  (define_insn_reservation "athlon_leave_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (eq_attr "type" "leave"))
  			 "athlon-double,(athlon-ieu+athlon-load)")
  
  ;; Lea executes in AGU unit with 2 cycles latency.
  (define_insn_reservation "athlon_lea" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "type" "lea"))
  			 "athlon-direct,athlon-agu,nothing")
  ;; Lea executes in AGU unit with 1 cycle latency on AMDFAM10
***************
*** 209,221 ****
  			 "athlon-vector,athlon-ieu0,athlon-mult,nothing,nothing,athlon-ieu0")
  ;; ??? Widening multiply is vector or double.
  (define_insn_reservation "athlon_imul_k8_DI" 4
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (and (eq_attr "mode" "DI")
  					(eq_attr "memory" "none,unknown"))))
  			 "athlon-direct0,athlon-ieu0,athlon-mult,nothing,athlon-ieu0")
  (define_insn_reservation "athlon_imul_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (eq_attr "memory" "none,unknown")))
  			 "athlon-direct0,athlon-ieu0,athlon-mult,athlon-ieu0")
--- 209,221 ----
  			 "athlon-vector,athlon-ieu0,athlon-mult,nothing,nothing,athlon-ieu0")
  ;; ??? Widening multiply is vector or double.
  (define_insn_reservation "athlon_imul_k8_DI" 4
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (and (eq_attr "mode" "DI")
  					(eq_attr "memory" "none,unknown"))))
  			 "athlon-direct0,athlon-ieu0,athlon-mult,nothing,athlon-ieu0")
  (define_insn_reservation "athlon_imul_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (eq_attr "memory" "none,unknown")))
  			 "athlon-direct0,athlon-ieu0,athlon-mult,athlon-ieu0")
***************
*** 231,243 ****
  				   (eq_attr "memory" "load,both")))
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-mult,nothing,nothing,athlon-ieu")
  (define_insn_reservation "athlon_imul_mem_k8_DI" 7
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (and (eq_attr "mode" "DI")
  					(eq_attr "memory" "load,both"))))
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-mult,nothing,athlon-ieu")
  (define_insn_reservation "athlon_imul_mem_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (eq_attr "memory" "load,both")))
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-mult,athlon-ieu")
--- 231,243 ----
  				   (eq_attr "memory" "load,both")))
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-mult,nothing,nothing,athlon-ieu")
  (define_insn_reservation "athlon_imul_mem_k8_DI" 7
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (and (eq_attr "mode" "DI")
  					(eq_attr "memory" "load,both"))))
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-mult,nothing,athlon-ieu")
  (define_insn_reservation "athlon_imul_mem_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "imul")
  				   (eq_attr "memory" "load,both")))
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-mult,athlon-ieu")
***************
*** 251,262 ****
  ;; Using the same heuristics for amdfam10 as K8 with idiv
  
  (define_insn_reservation "athlon_idiv" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "idiv")
  				   (eq_attr "memory" "none,unknown")))
  			 "athlon-vector,(athlon-ieu0*6+(athlon-fpsched,athlon-fvector))")
  (define_insn_reservation "athlon_idiv_mem" 9
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "idiv")
  				   (eq_attr "memory" "load,both")))
  			 "athlon-vector,((athlon-load,athlon-ieu0*6)+(athlon-fpsched,athlon-fvector))")
--- 251,262 ----
  ;; Using the same heuristics for amdfam10 as K8 with idiv
  
  (define_insn_reservation "athlon_idiv" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "idiv")
  				   (eq_attr "memory" "none,unknown")))
  			 "athlon-vector,(athlon-ieu0*6+(athlon-fpsched,athlon-fvector))")
  (define_insn_reservation "athlon_idiv_mem" 9
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "idiv")
  				   (eq_attr "memory" "load,both")))
  			 "athlon-vector,((athlon-load,athlon-ieu0*6)+(athlon-fpsched,athlon-fvector))")
***************
*** 264,276 ****
  ;; as idiv to create smaller automata.  This probably does not matter much.
  ;; Using the same heuristics for amdfam10 as K8 with idiv
  (define_insn_reservation "athlon_str" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "str")
  				   (eq_attr "memory" "load,both,store")))
  			 "athlon-vector,athlon-load,athlon-ieu0*6")
  
  (define_insn_reservation "athlon_idirect" 1
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "none,unknown"))))
--- 264,276 ----
  ;; as idiv to create smaller automata.  This probably does not matter much.
  ;; Using the same heuristics for amdfam10 as K8 with idiv
  (define_insn_reservation "athlon_str" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "str")
  				   (eq_attr "memory" "load,both,store")))
  			 "athlon-vector,athlon-load,athlon-ieu0*6")
  
  (define_insn_reservation "athlon_idirect" 1
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "none,unknown"))))
***************
*** 282,288 ****
  					(eq_attr "memory" "none,unknown"))))
  			 "athlon-direct,athlon-ieu")
  (define_insn_reservation "athlon_ivector" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "none,unknown"))))
--- 282,288 ----
  					(eq_attr "memory" "none,unknown"))))
  			 "athlon-direct,athlon-ieu")
  (define_insn_reservation "athlon_ivector" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "none,unknown"))))
***************
*** 295,307 ****
  			 "athlon-vector,athlon-ieu,athlon-ieu")
  
  (define_insn_reservation "athlon_idirect_loadmov" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "imov")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-load")
  
  (define_insn_reservation "athlon_idirect_load" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "load"))))
--- 295,307 ----
  			 "athlon-vector,athlon-ieu,athlon-ieu")
  
  (define_insn_reservation "athlon_idirect_loadmov" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "imov")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-load")
  
  (define_insn_reservation "athlon_idirect_load" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "load"))))
***************
*** 313,319 ****
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-load,athlon-ieu")
  (define_insn_reservation "athlon_ivector_load" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "load"))))
--- 313,319 ----
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-load,athlon-ieu")
  (define_insn_reservation "athlon_ivector_load" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "load"))))
***************
*** 326,338 ****
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-ieu")
  
  (define_insn_reservation "athlon_idirect_movstore" 1
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "imov")
  				   (eq_attr "memory" "store")))
  			 "athlon-direct,athlon-agu,athlon-store")
  
  (define_insn_reservation "athlon_idirect_both" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "both"))))
--- 326,338 ----
  			 "athlon-vector,athlon-load,athlon-ieu,athlon-ieu")
  
  (define_insn_reservation "athlon_idirect_movstore" 1
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "imov")
  				   (eq_attr "memory" "store")))
  			 "athlon-direct,athlon-agu,athlon-store")
  
  (define_insn_reservation "athlon_idirect_both" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "both"))))
***************
*** 349,355 ****
  			  athlon-store")
  
  (define_insn_reservation "athlon_ivector_both" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "both"))))
--- 349,355 ----
  			  athlon-store")
  
  (define_insn_reservation "athlon_ivector_both" 6
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "both"))))
***************
*** 368,374 ****
  			  athlon-store")
  
  (define_insn_reservation "athlon_idirect_store" 1
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "store"))))
--- 368,374 ----
  			  athlon-store")
  
  (define_insn_reservation "athlon_idirect_store" 1
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "direct")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "store"))))
***************
*** 383,389 ****
  			  athlon-store")
  
  (define_insn_reservation "athlon_ivector_store" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "store"))))
--- 383,389 ----
  			  athlon-store")
  
  (define_insn_reservation "athlon_ivector_store" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (and (eq_attr "unit" "integer,unknown")
  					(eq_attr "memory" "store"))))
***************
*** 405,411 ****
  					(eq_attr "mode" "XF"))))
  			 "athlon-vector,athlon-fpload2,athlon-fvector*9")
  (define_insn_reservation "athlon_fldxf_k8" 13
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (and (eq_attr "memory" "load")
  					(eq_attr "mode" "XF"))))
--- 405,411 ----
  					(eq_attr "mode" "XF"))))
  			 "athlon-vector,athlon-fpload2,athlon-fvector*9")
  (define_insn_reservation "athlon_fldxf_k8" 13
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (and (eq_attr "memory" "load")
  					(eq_attr "mode" "XF"))))
***************
*** 417,423 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fany")
  (define_insn_reservation "athlon_fld_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
--- 417,423 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fany")
  (define_insn_reservation "athlon_fld_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
***************
*** 429,435 ****
  					(eq_attr "mode" "XF"))))
  			 "athlon-vector,(athlon-fpsched+athlon-agu),(athlon-store2+(athlon-fvector*7))")
  (define_insn_reservation "athlon_fstxf_k8" 8
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (and (eq_attr "memory" "store,both")
  					(eq_attr "mode" "XF"))))
--- 429,435 ----
  					(eq_attr "mode" "XF"))))
  			 "athlon-vector,(athlon-fpsched+athlon-agu),(athlon-store2+(athlon-fvector*7))")
  (define_insn_reservation "athlon_fstxf_k8" 8
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (and (eq_attr "memory" "store,both")
  					(eq_attr "mode" "XF"))))
***************
*** 440,455 ****
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_fst_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_fist" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fistp,fisttp"))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_fmov" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fmov"))
  			 "athlon-direct,athlon-fpsched,athlon-faddmul")
  (define_insn_reservation "athlon_fadd_load" 4
--- 440,455 ----
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_fst_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fmov")
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_fist" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fistp,fisttp"))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_fmov" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fmov"))
  			 "athlon-direct,athlon-fpsched,athlon-faddmul")
  (define_insn_reservation "athlon_fadd_load" 4
***************
*** 458,469 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_fadd_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fop")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_fadd" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fop"))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
  (define_insn_reservation "athlon_fmul_load" 4
--- 458,469 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_fadd_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fop")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_fadd" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fop"))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
  (define_insn_reservation "athlon_fmul_load" 4
***************
*** 472,487 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_fmul_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fmul")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul")
  (define_insn_reservation "athlon_fmul" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fmul"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fsgn" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fsgn"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fdiv_load" 24
--- 472,487 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_fmul_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fmul")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul")
  (define_insn_reservation "athlon_fmul" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fmul"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fsgn" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fsgn"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fdiv_load" 24
***************
*** 490,496 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_fdiv_load_k8" 13
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fdiv")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul")
--- 490,496 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_fdiv_load_k8" 13
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fdiv")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul")
***************
*** 499,514 ****
  			      (eq_attr "type" "fdiv"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fdiv_k8" 11
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (eq_attr "type" "fdiv"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fpspc_load" 103
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fpspc")
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload,athlon-fvector")
  (define_insn_reservation "athlon_fpspc" 100
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fpspc"))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  (define_insn_reservation "athlon_fcmov_load" 7
--- 499,514 ----
  			      (eq_attr "type" "fdiv"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fdiv_k8" 11
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (eq_attr "type" "fdiv"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_fpspc_load" 103
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "fpspc")
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload,athlon-fvector")
  (define_insn_reservation "athlon_fpspc" 100
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fpspc"))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  (define_insn_reservation "athlon_fcmov_load" 7
***************
*** 521,532 ****
  			      (eq_attr "type" "fcmov"))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  (define_insn_reservation "athlon_fcmov_load_k8" 17
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fcmov")
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fploadk8,athlon-fvector")
  (define_insn_reservation "athlon_fcmov_k8" 15
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (eq_attr "type" "fcmov"))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  ;; fcomi is vector decoded by uses only one pipe.
--- 521,532 ----
  			      (eq_attr "type" "fcmov"))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  (define_insn_reservation "athlon_fcmov_load_k8" 17
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fcmov")
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fploadk8,athlon-fvector")
  (define_insn_reservation "athlon_fcmov_k8" 15
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (eq_attr "type" "fcmov"))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  ;; fcomi is vector decoded by uses only one pipe.
***************
*** 537,549 ****
  				        (eq_attr "memory" "load"))))
  			 "athlon-vector,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_fcomi_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fcmp")
  				   (and (eq_attr "athlon_decode" "vector")
  				        (eq_attr "memory" "load"))))
  			 "athlon-vector,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_fcomi" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (eq_attr "type" "fcmp")))
  			 "athlon-vector,athlon-fpsched,athlon-fadd")
--- 537,549 ----
  				        (eq_attr "memory" "load"))))
  			 "athlon-vector,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_fcomi_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fcmp")
  				   (and (eq_attr "athlon_decode" "vector")
  				        (eq_attr "memory" "load"))))
  			 "athlon-vector,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_fcomi" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "athlon_decode" "vector")
  				   (eq_attr "type" "fcmp")))
  			 "athlon-vector,athlon-fpsched,athlon-fadd")
***************
*** 553,570 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_fcom_load_k8" 4
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "fcmp")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_fcom" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (eq_attr "type" "fcmp"))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
  ;; Never seen by the scheduler because we still don't do post reg-stack
  ;; scheduling.
  ;(define_insn_reservation "athlon_fxch" 2
! ;			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  ;			      (eq_attr "type" "fxch"))
  ;			 "athlon-direct,athlon-fpsched,athlon-fany")
  
--- 553,570 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_fcom_load_k8" 4
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "fcmp")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_fcom" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (eq_attr "type" "fcmp"))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
  ;; Never seen by the scheduler because we still don't do post reg-stack
  ;; scheduling.
  ;(define_insn_reservation "athlon_fxch" 2
! ;			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  ;			      (eq_attr "type" "fxch"))
  ;			 "athlon-direct,athlon-fpsched,athlon-fany")
  
***************
*** 580,592 ****
  			      (and (eq_attr "type" "ssemov")
  				   (match_operand:DF 1 "memory_operand")))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
! (define_insn_reservation "athlon_movsd_load_generic64" 2
! 			 (and (eq_attr "cpu" "generic64")
  			      (and (eq_attr "type" "ssemov")
  				   (match_operand:DF 1 "memory_operand")))
  			 "athlon-double,athlon-fploadk8,(athlon-fstore+athlon-fmul)")
  (define_insn_reservation "athlon_movaps_load_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssemov")
  				   (and (eq_attr "mode" "V4SF,V2DF,TI")
  					(eq_attr "memory" "load"))))
--- 580,592 ----
  			      (and (eq_attr "type" "ssemov")
  				   (match_operand:DF 1 "memory_operand")))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
! (define_insn_reservation "athlon_movsd_load_generic" 2
! 			 (and (eq_attr "cpu" "generic")
  			      (and (eq_attr "type" "ssemov")
  				   (match_operand:DF 1 "memory_operand")))
  			 "athlon-double,athlon-fploadk8,(athlon-fstore+athlon-fmul)")
  (define_insn_reservation "athlon_movaps_load_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssemov")
  				   (and (eq_attr "mode" "V4SF,V2DF,TI")
  					(eq_attr "memory" "load"))))
***************
*** 604,610 ****
  					(eq_attr "memory" "load"))))
  			 "athlon-vector,athlon-fpload,(athlon-fany*2)")
  (define_insn_reservation "athlon_movss_load_k8" 1
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssemov")
  				   (and (eq_attr "mode" "SF,DI")
  					(eq_attr "memory" "load"))))
--- 604,610 ----
  					(eq_attr "memory" "load"))))
  			 "athlon-vector,athlon-fpload,(athlon-fany*2)")
  (define_insn_reservation "athlon_movss_load_k8" 1
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssemov")
  				   (and (eq_attr "mode" "SF,DI")
  					(eq_attr "memory" "load"))))
***************
*** 615,621 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fany")
  (define_insn_reservation "athlon_mmxsseld_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
--- 615,621 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fany")
  (define_insn_reservation "athlon_mmxsseld_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
***************
*** 637,655 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8, athlon-fany")
  (define_insn_reservation "athlon_mmxssest" 3
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (and (eq_attr "mode" "V4SF,V2DF,TI")
  					(eq_attr "memory" "store,both"))))
  			 "athlon-vector,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store2)*2)")
  (define_insn_reservation "athlon_mmxssest_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (and (eq_attr "mode" "V4SF,V2DF,TI")
  					(eq_attr "memory" "store,both"))))
  			 "athlon-double,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store2)*2)")
  (define_insn_reservation "athlon_mmxssest_short" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
--- 637,655 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8, athlon-fany")
  (define_insn_reservation "athlon_mmxssest" 3
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (and (eq_attr "mode" "V4SF,V2DF,TI")
  					(eq_attr "memory" "store,both"))))
  			 "athlon-vector,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store2)*2)")
  (define_insn_reservation "athlon_mmxssest_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (and (eq_attr "mode" "V4SF,V2DF,TI")
  					(eq_attr "memory" "store,both"))))
  			 "athlon-double,(athlon-fpsched+athlon-agu),((athlon-fstore+athlon-store2)*2)")
  (define_insn_reservation "athlon_mmxssest_short" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "mmxmov,ssemov")
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
***************
*** 673,679 ****
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_movaps_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssemov")
  				   (eq_attr "mode" "V4SF,V2DF,TI")))
  			 "athlon-double,athlon-fpsched,((athlon-faddmul+athlon-faddmul) | (athlon-faddmul, athlon-faddmul))")
--- 673,679 ----
  				   (eq_attr "memory" "store,both")))
  			 "athlon-direct,(athlon-fpsched+athlon-agu),(athlon-fstore+athlon-store)")
  (define_insn_reservation "athlon_movaps_k8" 2
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssemov")
  				   (eq_attr "mode" "V4SF,V2DF,TI")))
  			 "athlon-double,athlon-fpsched,((athlon-faddmul+athlon-faddmul) | (athlon-faddmul, athlon-faddmul))")
***************
*** 683,707 ****
  				   (eq_attr "mode" "V4SF,V2DF,TI")))
  			 "athlon-vector,athlon-fpsched,(athlon-faddmul+athlon-faddmul)")
  (define_insn_reservation "athlon_mmxssemov" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "type" "mmxmov,ssemov"))
  			 "athlon-direct,athlon-fpsched,athlon-faddmul")
  (define_insn_reservation "athlon_mmxmul_load" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "mmxmul")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_mmxmul" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "type" "mmxmul"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_mmx_load" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "unit" "mmx")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-faddmul")
  (define_insn_reservation "athlon_mmx" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "unit" "mmx"))
  			 "athlon-direct,athlon-fpsched,athlon-faddmul")
  ;; SSE operations are handled by the i387 unit as well.  The latency
--- 683,707 ----
  				   (eq_attr "mode" "V4SF,V2DF,TI")))
  			 "athlon-vector,athlon-fpsched,(athlon-faddmul+athlon-faddmul)")
  (define_insn_reservation "athlon_mmxssemov" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "type" "mmxmov,ssemov"))
  			 "athlon-direct,athlon-fpsched,athlon-faddmul")
  (define_insn_reservation "athlon_mmxmul_load" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "mmxmul")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_mmxmul" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "type" "mmxmul"))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_mmx_load" 3
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "unit" "mmx")
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fpload,athlon-faddmul")
  (define_insn_reservation "athlon_mmx" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "unit" "mmx"))
  			 "athlon-direct,athlon-fpsched,athlon-faddmul")
  ;; SSE operations are handled by the i387 unit as well.  The latency
***************
*** 713,719 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fmul*2)")
  (define_insn_reservation "athlon_sselog_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "sselog,sselog1,sseshuf,sseshuf1")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fmul*2)")
--- 713,719 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fmul*2)")
  (define_insn_reservation "athlon_sselog_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "sselog,sselog1,sseshuf,sseshuf1")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fmul*2)")
***************
*** 727,733 ****
  			      (eq_attr "type" "sselog,sselog1,sseshuf,sseshuf1"))
  			 "athlon-vector,athlon-fpsched,athlon-fmul*2")
  (define_insn_reservation "athlon_sselog_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (eq_attr "type" "sselog,sselog1,sseshuf,sseshuf1"))
  			 "athlon-double,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_sselog_amdfam10" 2
--- 727,733 ----
  			      (eq_attr "type" "sselog,sselog1,sseshuf,sseshuf1"))
  			 "athlon-vector,athlon-fpsched,athlon-fmul*2")
  (define_insn_reservation "athlon_sselog_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (eq_attr "type" "sselog,sselog1,sseshuf,sseshuf1"))
  			 "athlon-double,athlon-fpsched,athlon-fmul")
  (define_insn_reservation "athlon_sselog_amdfam10" 2
***************
*** 743,755 ****
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_ssecmp_load_k8" 4
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "ssecmp")
  				   (and (eq_attr "mode" "SF,DF,DI,TI")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_ssecmp" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "ssecmp")
  				   (eq_attr "mode" "SF,DF,DI,TI")))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
--- 743,755 ----
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_ssecmp_load_k8" 4
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "ssecmp")
  				   (and (eq_attr "mode" "SF,DF,DI,TI")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_ssecmp" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "ssecmp")
  				   (eq_attr "mode" "SF,DF,DI,TI")))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
***************
*** 759,765 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fadd*2)")
  (define_insn_reservation "athlon_ssecmpvector_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssecmp")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fadd*2)")
--- 759,765 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fadd*2)")
  (define_insn_reservation "athlon_ssecmpvector_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssecmp")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fadd*2)")
***************
*** 773,779 ****
  			      (eq_attr "type" "ssecmp"))
  			 "athlon-vector,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_ssecmpvector_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (eq_attr "type" "ssecmp"))
  			 "athlon-double,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_ssecmpvector_amdfam10" 2
--- 773,779 ----
  			      (eq_attr "type" "ssecmp"))
  			 "athlon-vector,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_ssecmpvector_k8" 3
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (eq_attr "type" "ssecmp"))
  			 "athlon-double,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_ssecmpvector_amdfam10" 2
***************
*** 786,792 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_ssecomi_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssecomi")
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fploadk8,athlon-fadd")
--- 786,792 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_ssecomi_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssecomi")
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fploadk8,athlon-fadd")
***************
*** 796,802 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_ssecomi" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (eq_attr "type" "ssecomi"))
  			 "athlon-vector,athlon-fpsched,athlon-fadd")
  (define_insn_reservation "athlon_ssecomi_amdfam10" 3
--- 796,802 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_ssecomi" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (eq_attr "type" "ssecomi"))
  			 "athlon-vector,athlon-fpsched,athlon-fadd")
  (define_insn_reservation "athlon_ssecomi_amdfam10" 3
***************
*** 811,823 ****
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_sseadd_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "sseadd,sseadd1")
  				   (and (eq_attr "mode" "SF,DF,DI")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_sseadd" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "sseadd,sseadd1")
  				   (eq_attr "mode" "SF,DF,DI")))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
--- 811,823 ----
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fadd")
  (define_insn_reservation "athlon_sseadd_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "sseadd,sseadd1")
  				   (and (eq_attr "mode" "SF,DF,DI")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fadd")
  (define_insn_reservation "athlon_sseadd" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "sseadd,sseadd1")
  				   (eq_attr "mode" "SF,DF,DI")))
  			 "athlon-direct,athlon-fpsched,athlon-fadd")
***************
*** 827,833 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fadd*2)")
  (define_insn_reservation "athlon_sseaddvector_load_k8" 7
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "sseadd,sseadd1")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fadd*2)")
--- 827,833 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fadd*2)")
  (define_insn_reservation "athlon_sseaddvector_load_k8" 7
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "sseadd,sseadd1")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fadd*2)")
***************
*** 841,847 ****
  			      (eq_attr "type" "sseadd,sseadd1"))
  			 "athlon-vector,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_sseaddvector_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (eq_attr "type" "sseadd,sseadd1"))
  			 "athlon-double,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_sseaddvector_amdfam10" 4
--- 841,847 ----
  			      (eq_attr "type" "sseadd,sseadd1"))
  			 "athlon-vector,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_sseaddvector_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (eq_attr "type" "sseadd,sseadd1"))
  			 "athlon-double,athlon-fpsched,(athlon-fadd*2)")
  (define_insn_reservation "athlon_sseaddvector_amdfam10" 4
***************
*** 855,861 ****
  
  ;; cvtss2sd
  (define_insn_reservation "athlon_ssecvt_cvtss2sd_load_k8" 4
! 			 (and (eq_attr "cpu" "k8,athlon,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "direct")
  					(and (eq_attr "mode" "DF")
--- 855,861 ----
  
  ;; cvtss2sd
  (define_insn_reservation "athlon_ssecvt_cvtss2sd_load_k8" 4
! 			 (and (eq_attr "cpu" "k8,athlon,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "direct")
  					(and (eq_attr "mode" "DF")
***************
*** 869,875 ****
  					     (eq_attr "memory" "load")))))
  			 "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  (define_insn_reservation "athlon_ssecvt_cvtss2sd" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "direct")
  					(eq_attr "mode" "DF"))))
--- 869,875 ----
  					     (eq_attr "memory" "load")))))
  			 "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  (define_insn_reservation "athlon_ssecvt_cvtss2sd" 2
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "direct")
  					(eq_attr "mode" "DF"))))
***************
*** 882,888 ****
  			 "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
  ;; cvtps2pd.  Model same way the other double decoded FP conversions.
  (define_insn_reservation "athlon_ssecvt_cvtps2pd_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,athlon,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "V2DF,V4SF,TI")
--- 882,888 ----
  			 "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
  ;; cvtps2pd.  Model same way the other double decoded FP conversions.
  (define_insn_reservation "athlon_ssecvt_cvtps2pd_load_k8" 5
! 			 (and (eq_attr "cpu" "k8,athlon,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "V2DF,V4SF,TI")
***************
*** 896,902 ****
  					     (eq_attr "memory" "load")))))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
  (define_insn_reservation "athlon_ssecvt_cvtps2pd_k8" 3
! 			 (and (eq_attr "cpu" "k8,athlon,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(eq_attr "mode" "V2DF,V4SF,TI"))))
--- 896,902 ----
  					     (eq_attr "memory" "load")))))
  			 "athlon-direct,athlon-fploadk8,athlon-fstore")
  (define_insn_reservation "athlon_ssecvt_cvtps2pd_k8" 3
! 			 (and (eq_attr "cpu" "k8,athlon,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(eq_attr "mode" "V2DF,V4SF,TI"))))
***************
*** 932,938 ****
  					     (eq_attr "memory" "load")))))
  			 "athlon-vector,athlon-fpload,(athlon-fstore*2)")
  (define_insn_reservation "athlon_sseicvt_cvtsi2ss_load_k8" 9
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SF,DF")
--- 932,938 ----
  					     (eq_attr "memory" "load")))))
  			 "athlon-vector,athlon-fpload,(athlon-fstore*2)")
  (define_insn_reservation "athlon_sseicvt_cvtsi2ss_load_k8" 9
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SF,DF")
***************
*** 947,953 ****
  			 "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsi2sd reg,reg is double decoded (vector on Athlon)
  (define_insn_reservation "athlon_sseicvt_cvtsi2sd_k8" 11
! 			 (and (eq_attr "cpu" "k8,athlon,generic64")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SF,DF")
--- 947,953 ----
  			 "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsi2sd reg,reg is double decoded (vector on Athlon)
  (define_insn_reservation "athlon_sseicvt_cvtsi2sd_k8" 11
! 			 (and (eq_attr "cpu" "k8,athlon,generic")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SF,DF")
***************
*** 962,968 ****
  			 "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsi2ss reg, reg is doublepath
  (define_insn_reservation "athlon_sseicvt_cvtsi2ss" 14
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "SF,DF")
--- 962,968 ----
  			 "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsi2ss reg, reg is doublepath
  (define_insn_reservation "athlon_sseicvt_cvtsi2ss" 14
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "SF,DF")
***************
*** 977,983 ****
  			 "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsd2ss mem,reg is doublepath, troughput unknown, latency 9
  (define_insn_reservation "athlon_ssecvt_cvtsd2ss_load_k8" 9
! 			 (and (eq_attr "cpu" "k8,athlon,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SF")
--- 977,983 ----
  			 "athlon-vector,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsd2ss mem,reg is doublepath, troughput unknown, latency 9
  (define_insn_reservation "athlon_ssecvt_cvtsd2ss_load_k8" 9
! 			 (and (eq_attr "cpu" "k8,athlon,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SF")
***************
*** 992,998 ****
  			 "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsd2ss reg,reg is vectorpath, troughput unknown, latency 12
  (define_insn_reservation "athlon_ssecvt_cvtsd2ss" 12
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "SF")
--- 992,998 ----
  			 "athlon-double,athlon-fploadk8,(athlon-faddmul+athlon-fstore)")
  ;; cvtsd2ss reg,reg is vectorpath, troughput unknown, latency 12
  (define_insn_reservation "athlon_ssecvt_cvtsd2ss" 12
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "SF")
***************
*** 1006,1012 ****
  					     (eq_attr "memory" "none")))))
  			 "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
  (define_insn_reservation "athlon_ssecvt_cvtpd2ps_load_k8" 8
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "V4SF,V2DF,TI")
--- 1006,1012 ----
  					     (eq_attr "memory" "none")))))
  			 "athlon-vector,athlon-fpsched,athlon-faddmul,(athlon-fstore*2)")
  (define_insn_reservation "athlon_ssecvt_cvtpd2ps_load_k8" 8
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "V4SF,V2DF,TI")
***************
*** 1022,1028 ****
  ;; cvtpd2ps mem,reg is vectorpath, troughput unknown, latency 10
  ;; ??? Why it is fater than cvtsd2ss?
  (define_insn_reservation "athlon_ssecvt_cvtpd2ps" 8
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "V4SF,V2DF,TI")
--- 1022,1028 ----
  ;; cvtpd2ps mem,reg is vectorpath, troughput unknown, latency 10
  ;; ??? Why it is fater than cvtsd2ss?
  (define_insn_reservation "athlon_ssecvt_cvtpd2ps" 8
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "ssecvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "V4SF,V2DF,TI")
***************
*** 1037,1043 ****
  			 "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)")
  ;; cvtsd2si mem,reg is doublepath, troughput 1, latency 9
  (define_insn_reservation "athlon_secvt_cvtsX2si_load" 9
! 			 (and (eq_attr "cpu" "athlon,k8,generic64")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "SI,DI")
--- 1037,1043 ----
  			 "athlon-double,athlon-fpsched,(athlon-faddmul+athlon-fstore)")
  ;; cvtsd2si mem,reg is doublepath, troughput 1, latency 9
  (define_insn_reservation "athlon_secvt_cvtsX2si_load" 9
! 			 (and (eq_attr "cpu" "athlon,k8,generic")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "vector")
  					(and (eq_attr "mode" "SI,DI")
***************
*** 1059,1065 ****
  					     (eq_attr "memory" "none")))))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  (define_insn_reservation "athlon_ssecvt_cvtsX2si_k8" 9
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SI,DI")
--- 1059,1065 ----
  					     (eq_attr "memory" "none")))))
  			 "athlon-vector,athlon-fpsched,athlon-fvector")
  (define_insn_reservation "athlon_ssecvt_cvtsX2si_k8" 9
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "sseicvt")
  				   (and (eq_attr "athlon_decode" "double")
  					(and (eq_attr "mode" "SI,DI")
***************
*** 1097,1109 ****
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_ssemul_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "ssemul")
  				   (and (eq_attr "mode" "SF,DF")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul")
  (define_insn_reservation "athlon_ssemul" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "ssemul")
  				   (eq_attr "mode" "SF,DF")))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
--- 1097,1109 ----
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fmul")
  (define_insn_reservation "athlon_ssemul_load_k8" 6
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "ssemul")
  				   (and (eq_attr "mode" "SF,DF")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul")
  (define_insn_reservation "athlon_ssemul" 4
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "ssemul")
  				   (eq_attr "mode" "SF,DF")))
  			 "athlon-direct,athlon-fpsched,athlon-fmul")
***************
*** 1113,1119 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fmul*2)")
  (define_insn_reservation "athlon_ssemulvector_load_k8" 7
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssemul")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fmul*2)")
--- 1113,1119 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,(athlon-fmul*2)")
  (define_insn_reservation "athlon_ssemulvector_load_k8" 7
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssemul")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,(athlon-fmul*2)")
***************
*** 1127,1133 ****
  			      (eq_attr "type" "ssemul"))
  			 "athlon-vector,athlon-fpsched,(athlon-fmul*2)")
  (define_insn_reservation "athlon_ssemulvector_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (eq_attr "type" "ssemul"))
  			 "athlon-double,athlon-fpsched,(athlon-fmul*2)")
  (define_insn_reservation "athlon_ssemulvector_amdfam10" 4
--- 1127,1133 ----
  			      (eq_attr "type" "ssemul"))
  			 "athlon-vector,athlon-fpsched,(athlon-fmul*2)")
  (define_insn_reservation "athlon_ssemulvector_k8" 5
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (eq_attr "type" "ssemul"))
  			 "athlon-double,athlon-fpsched,(athlon-fmul*2)")
  (define_insn_reservation "athlon_ssemulvector_amdfam10" 4
***************
*** 1142,1154 ****
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fmul*17")
  (define_insn_reservation "athlon_ssediv_load_k8" 22
! 			 (and (eq_attr "cpu" "k8,generic64,amdfam10")
  			      (and (eq_attr "type" "ssediv")
  				   (and (eq_attr "mode" "SF,DF")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul*17")
  (define_insn_reservation "athlon_ssediv" 20
! 			 (and (eq_attr "cpu" "athlon,k8,generic64,amdfam10")
  			      (and (eq_attr "type" "ssediv")
  				   (eq_attr "mode" "SF,DF")))
  			 "athlon-direct,athlon-fpsched,athlon-fmul*17")
--- 1142,1154 ----
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fpload,athlon-fmul*17")
  (define_insn_reservation "athlon_ssediv_load_k8" 22
! 			 (and (eq_attr "cpu" "k8,generic,amdfam10")
  			      (and (eq_attr "type" "ssediv")
  				   (and (eq_attr "mode" "SF,DF")
  					(eq_attr "memory" "load"))))
  			 "athlon-direct,athlon-fploadk8,athlon-fmul*17")
  (define_insn_reservation "athlon_ssediv" 20
! 			 (and (eq_attr "cpu" "athlon,k8,generic,amdfam10")
  			      (and (eq_attr "type" "ssediv")
  				   (eq_attr "mode" "SF,DF")))
  			 "athlon-direct,athlon-fpsched,athlon-fmul*17")
***************
*** 1158,1164 ****
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,athlon-fmul*34")
  (define_insn_reservation "athlon_ssedivvector_load_k8" 35
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (and (eq_attr "type" "ssediv")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,athlon-fmul*34")
--- 1158,1164 ----
  				   (eq_attr "memory" "load")))
  			 "athlon-vector,athlon-fpload2,athlon-fmul*34")
  (define_insn_reservation "athlon_ssedivvector_load_k8" 35
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (and (eq_attr "type" "ssediv")
  				   (eq_attr "memory" "load")))
  			 "athlon-double,athlon-fpload2k8,athlon-fmul*34")
***************
*** 1172,1178 ****
  			      (eq_attr "type" "ssediv"))
  			 "athlon-vector,athlon-fmul*34")
  (define_insn_reservation "athlon_ssedivvector_k8" 39
! 			 (and (eq_attr "cpu" "k8,generic64")
  			      (eq_attr "type" "ssediv"))
  			 "athlon-double,athlon-fmul*34")
  (define_insn_reservation "athlon_ssedivvector_amdfam10" 20
--- 1172,1178 ----
  			      (eq_attr "type" "ssediv"))
  			 "athlon-vector,athlon-fmul*34")
  (define_insn_reservation "athlon_ssedivvector_k8" 39
! 			 (and (eq_attr "cpu" "k8,generic")
  			      (eq_attr "type" "ssediv"))
  			 "athlon-double,athlon-fmul*34")
  (define_insn_reservation "athlon_ssedivvector_amdfam10" 20
Index: config/i386/i386-c.c
===================================================================
*** config/i386/i386-c.c	(revision 202681)
--- config/i386/i386-c.c	(working copy)
*************** ix86_target_macros_internal (HOST_WIDE_I
*** 156,163 ****
      /* use PROCESSOR_max to not set/unset the arch macro.  */
      case PROCESSOR_max:
        break;
!     case PROCESSOR_GENERIC32:
!     case PROCESSOR_GENERIC64:
        gcc_unreachable ();
      }
  
--- 156,162 ----
      /* use PROCESSOR_max to not set/unset the arch macro.  */
      case PROCESSOR_max:
        break;
!     case PROCESSOR_GENERIC:
        gcc_unreachable ();
      }
  
*************** ix86_target_macros_internal (HOST_WIDE_I
*** 248,255 ****
      case PROCESSOR_SLM:
        def_or_undef (parse_in, "__tune_slm__");
        break;
!     case PROCESSOR_GENERIC32:
!     case PROCESSOR_GENERIC64:
        break;
      /* use PROCESSOR_max to not set/unset the tune macro.  */
      case PROCESSOR_max:
--- 247,253 ----
      case PROCESSOR_SLM:
        def_or_undef (parse_in, "__tune_slm__");
        break;
!     case PROCESSOR_GENERIC:
        break;
      /* use PROCESSOR_max to not set/unset the tune macro.  */
      case PROCESSOR_max:
Index: config/i386/driver-i386.c
===================================================================
*** config/i386/driver-i386.c	(revision 202681)
--- config/i386/driver-i386.c	(working copy)
*************** const char *host_detect_local_cpu (int a
*** 578,590 ****
  	    case 6:
  	      if (model > 9)
  		/* Use the default detection procedure.  */
! 		processor = PROCESSOR_GENERIC32;
  	      else if (model == 9)
  		cpu = "c3-2";
  	      else if (model >= 6)
  		cpu = "c3";
  	      else
! 		processor = PROCESSOR_GENERIC32;
  	      break;
  	    case 5:
  	      if (has_3dnow)
--- 578,590 ----
  	    case 6:
  	      if (model > 9)
  		/* Use the default detection procedure.  */
! 		processor = PROCESSOR_GENERIC;
  	      else if (model == 9)
  		cpu = "c3-2";
  	      else if (model >= 6)
  		cpu = "c3";
  	      else
! 		processor = PROCESSOR_GENERIC;
  	      break;
  	    case 5:
  	      if (has_3dnow)
*************** const char *host_detect_local_cpu (int a
*** 592,602 ****
  	      else if (has_mmx)
  		cpu = "winchip2-c6";
  	      else
! 		processor = PROCESSOR_GENERIC32;
  	      break;
  	    default:
  	      /* We have no idea.  */
! 	      processor = PROCESSOR_GENERIC32;
  	    }
  	}
      }
--- 592,602 ----
  	      else if (has_mmx)
  		cpu = "winchip2-c6";
  	      else
! 		processor = PROCESSOR_GENERIC;
  	      break;
  	    default:
  	      /* We have no idea.  */
! 	      processor = PROCESSOR_GENERIC;
  	    }
  	}
      }
*************** const char *host_detect_local_cpu (int a
*** 618,624 ****
  	  break;
  	default:
  	  /* We have no idea.  */
! 	  processor = PROCESSOR_GENERIC32;
  	}
      }
  
--- 618,624 ----
  	  break;
  	default:
  	  /* We have no idea.  */
! 	  processor = PROCESSOR_GENERIC;
  	}
      }
  
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 202681)
--- config/i386/i386.c	(working copy)
*************** struct processor_costs slm_cost = {
*** 1644,1661 ****
    1,					/* cond_not_taken_branch_cost.  */
  };
  
! /* Generic64 should produce code tuned for Nocona and K8.  */
  
! static stringop_algs generic64_memcpy[2] = {
    DUMMY_STRINGOP_ALGS,
    {libcall, {{32, loop, false}, {8192, rep_prefix_8_byte, false},
               {-1, libcall, false}}}};
! static stringop_algs generic64_memset[2] = {
    DUMMY_STRINGOP_ALGS,
    {libcall, {{32, loop, false}, {8192, rep_prefix_8_byte, false},
               {-1, libcall, false}}}};
  static const
! struct processor_costs generic64_cost = {
    COSTS_N_INSNS (1),			/* cost of an add instruction */
    /* On all chips taken into consideration lea is 2 cycles and more.  With
       this cost however our current implementation of synth_mult results in
--- 1644,1662 ----
    1,					/* cond_not_taken_branch_cost.  */
  };
  
! /* Generic should produce code tuned for Core-i7 (and newer chips)
!    and btver1 (and newer chips).  */
  
! static stringop_algs generic_memcpy[2] = {
    DUMMY_STRINGOP_ALGS,
    {libcall, {{32, loop, false}, {8192, rep_prefix_8_byte, false},
               {-1, libcall, false}}}};
! static stringop_algs generic_memset[2] = {
    DUMMY_STRINGOP_ALGS,
    {libcall, {{32, loop, false}, {8192, rep_prefix_8_byte, false},
               {-1, libcall, false}}}};
  static const
! struct processor_costs generic_cost = {
    COSTS_N_INSNS (1),			/* cost of an add instruction */
    /* On all chips taken into consideration lea is 2 cycles and more.  With
       this cost however our current implementation of synth_mult results in
*************** struct processor_costs generic64_cost =
*** 1713,1720 ****
    COSTS_N_INSNS (8),			/* cost of FABS instruction.  */
    COSTS_N_INSNS (8),			/* cost of FCHS instruction.  */
    COSTS_N_INSNS (40),			/* cost of FSQRT instruction.  */
!   generic64_memcpy,
!   generic64_memset,
    1,					/* scalar_stmt_cost.  */
    1,					/* scalar load_cost.  */
    1,					/* scalar_store_cost.  */
--- 1714,1721 ----
    COSTS_N_INSNS (8),			/* cost of FABS instruction.  */
    COSTS_N_INSNS (8),			/* cost of FCHS instruction.  */
    COSTS_N_INSNS (40),			/* cost of FSQRT instruction.  */
!   generic_memcpy,
!   generic_memset,
    1,					/* scalar_stmt_cost.  */
    1,					/* scalar load_cost.  */
    1,					/* scalar_store_cost.  */
*************** struct processor_costs core_cost = {
*** 1814,1896 ****
    1,					/* cond_not_taken_branch_cost.  */
  };
  
- /* Generic32 should produce code tuned for PPro, Pentium4, Nocona,
-    Athlon and K8.  */
- static stringop_algs generic32_memcpy[2] = {
-   {libcall, {{32, loop, false}, {8192, rep_prefix_4_byte, false},
-              {-1, libcall, false}}},
-   DUMMY_STRINGOP_ALGS};
- static stringop_algs generic32_memset[2] = {
-   {libcall, {{32, loop, false}, {8192, rep_prefix_4_byte, false},
-              {-1, libcall, false}}},
-   DUMMY_STRINGOP_ALGS};
- static const
- struct processor_costs generic32_cost = {
-   COSTS_N_INSNS (1),			/* cost of an add instruction */
-   COSTS_N_INSNS (1) + 1,		/* cost of a lea instruction */
-   COSTS_N_INSNS (1),			/* variable shift costs */
-   COSTS_N_INSNS (1),			/* constant shift costs */
-   {COSTS_N_INSNS (3),			/* cost of starting multiply for QI */
-    COSTS_N_INSNS (4),			/*				 HI */
-    COSTS_N_INSNS (3),			/*				 SI */
-    COSTS_N_INSNS (4),			/*				 DI */
-    COSTS_N_INSNS (2)},			/*			      other */
-   0,					/* cost of multiply per each bit set */
-   {COSTS_N_INSNS (18),			/* cost of a divide/mod for QI */
-    COSTS_N_INSNS (26),			/*			    HI */
-    COSTS_N_INSNS (42),			/*			    SI */
-    COSTS_N_INSNS (74),			/*			    DI */
-    COSTS_N_INSNS (74)},			/*			    other */
-   COSTS_N_INSNS (1),			/* cost of movsx */
-   COSTS_N_INSNS (1),			/* cost of movzx */
-   8,					/* "large" insn */
-   17,					/* MOVE_RATIO */
-   4,				     /* cost for loading QImode using movzbl */
-   {4, 4, 4},				/* cost of loading integer registers
- 					   in QImode, HImode and SImode.
- 					   Relative to reg-reg move (2).  */
-   {4, 4, 4},				/* cost of storing integer registers */
-   4,					/* cost of reg,reg fld/fst */
-   {12, 12, 12},				/* cost of loading fp registers
- 					   in SFmode, DFmode and XFmode */
-   {6, 6, 8},				/* cost of storing fp registers
- 					   in SFmode, DFmode and XFmode */
-   2,					/* cost of moving MMX register */
-   {8, 8},				/* cost of loading MMX registers
- 					   in SImode and DImode */
-   {8, 8},				/* cost of storing MMX registers
- 					   in SImode and DImode */
-   2,					/* cost of moving SSE register */
-   {8, 8, 8},				/* cost of loading SSE registers
- 					   in SImode, DImode and TImode */
-   {8, 8, 8},				/* cost of storing SSE registers
- 					   in SImode, DImode and TImode */
-   5,					/* MMX or SSE register to integer */
-   32,					/* size of l1 cache.  */
-   256,					/* size of l2 cache.  */
-   64,					/* size of prefetch block */
-   6,					/* number of parallel prefetches */
-   3,					/* Branch cost */
-   COSTS_N_INSNS (8),			/* cost of FADD and FSUB insns.  */
-   COSTS_N_INSNS (8),			/* cost of FMUL instruction.  */
-   COSTS_N_INSNS (20),			/* cost of FDIV instruction.  */
-   COSTS_N_INSNS (8),			/* cost of FABS instruction.  */
-   COSTS_N_INSNS (8),			/* cost of FCHS instruction.  */
-   COSTS_N_INSNS (40),			/* cost of FSQRT instruction.  */
-   generic32_memcpy,
-   generic32_memset,
-   1,					/* scalar_stmt_cost.  */
-   1,					/* scalar load_cost.  */
-   1,					/* scalar_store_cost.  */
-   1,					/* vec_stmt_cost.  */
-   1,					/* vec_to_scalar_cost.  */
-   1,					/* scalar_to_vec_cost.  */
-   1,					/* vec_align_load_cost.  */
-   2,					/* vec_unalign_load_cost.  */
-   1,					/* vec_store_cost.  */
-   3,					/* cond_taken_branch_cost.  */
-   1,					/* cond_not_taken_branch_cost.  */
- };
  
  /* Set by -mtune.  */
  const struct processor_costs *ix86_tune_cost = &pentium_cost;
--- 1815,1820 ----
*************** const struct processor_costs *ix86_cost
*** 1929,1940 ****
  #define m_BTVER (m_BTVER1 | m_BTVER2)
  #define m_AMD_MULTIPLE (m_ATHLON_K8 | m_AMDFAM10 | m_BDVER | m_BTVER)
  
! #define m_GENERIC32 (1<<PROCESSOR_GENERIC32)
! #define m_GENERIC64 (1<<PROCESSOR_GENERIC64)
! 
! /* Generic instruction choice should be common subset of supported CPUs
!    (PPro/PENT4/NOCONA/CORE2/Athlon/K8).  */
! #define m_GENERIC (m_GENERIC32 | m_GENERIC64)
  
  const char* ix86_tune_feature_names[X86_TUNE_LAST] = {
  #undef DEF_TUNE
--- 1853,1859 ----
  #define m_BTVER (m_BTVER1 | m_BTVER2)
  #define m_AMD_MULTIPLE (m_ATHLON_K8 | m_AMDFAM10 | m_BDVER | m_BTVER)
  
! #define m_GENERIC (1<<PROCESSOR_GENERIC)
  
  const char* ix86_tune_feature_names[X86_TUNE_LAST] = {
  #undef DEF_TUNE
*************** static const struct ptt processor_target
*** 2384,2391 ****
    {&core_cost, 16, 10, 16, 10, 16},
    /* Core avx2  */
    {&core_cost, 16, 10, 16, 10, 16},
!   {&generic32_cost, 16, 7, 16, 7, 16},
!   {&generic64_cost, 16, 10, 16, 10, 16},
    {&amdfam10_cost, 32, 24, 32, 7, 32},
    {&bdver1_cost, 16, 10, 16, 7, 11},
    {&bdver2_cost, 16, 10, 16, 7, 11},
--- 2303,2309 ----
    {&core_cost, 16, 10, 16, 10, 16},
    /* Core avx2  */
    {&core_cost, 16, 10, 16, 10, 16},
!   {&generic_cost, 16, 10, 16, 10, 16},
    {&amdfam10_cost, 32, 24, 32, 7, 32},
    {&bdver1_cost, 16, 10, 16, 7, 11},
    {&bdver2_cost, 16, 10, 16, 7, 11},
*************** ix86_option_override_internal (bool main
*** 3182,3188 ****
  	| PTA_XOP | PTA_LWP | PTA_BMI | PTA_TBM | PTA_F16C
  	| PTA_FMA | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE 
  	| PTA_XSAVEOPT | PTA_FSGSBASE},
!       {"btver1", PROCESSOR_BTVER1, CPU_GENERIC64,
  	PTA_64BIT | PTA_MMX |  PTA_SSE  | PTA_SSE2 | PTA_SSE3
  	| PTA_SSSE3 | PTA_SSE4A |PTA_ABM | PTA_CX16 | PTA_PRFCHW
  	| PTA_FXSR | PTA_XSAVE},
--- 3100,3106 ----
  	| PTA_XOP | PTA_LWP | PTA_BMI | PTA_TBM | PTA_F16C
  	| PTA_FMA | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE 
  	| PTA_XSAVEOPT | PTA_FSGSBASE},
!       {"btver1", PROCESSOR_BTVER1, CPU_GENERIC,
  	PTA_64BIT | PTA_MMX |  PTA_SSE  | PTA_SSE2 | PTA_SSE3
  	| PTA_SSSE3 | PTA_SSE4A |PTA_ABM | PTA_CX16 | PTA_PRFCHW
  	| PTA_FXSR | PTA_XSAVE},
*************** ix86_option_override_internal (bool main
*** 3193,3201 ****
  	| PTA_BMI | PTA_F16C | PTA_MOVBE | PTA_PRFCHW
  	| PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT},
  
!       {"generic32", PROCESSOR_GENERIC32, CPU_PENTIUMPRO,
! 	PTA_HLE /* flags are only used for -march switch.  */ },
!       {"generic64", PROCESSOR_GENERIC64, CPU_GENERIC64,
  	PTA_64BIT
  	| PTA_HLE /* flags are only used for -march switch.  */ },
      };
--- 3111,3117 ----
  	| PTA_BMI | PTA_F16C | PTA_MOVBE | PTA_PRFCHW
  	| PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT},
  
!       {"generic", PROCESSOR_GENERIC, CPU_GENERIC,
  	PTA_64BIT
  	| PTA_HLE /* flags are only used for -march switch.  */ },
      };
*************** ix86_option_override_internal (bool main
*** 3295,3310 ****
  	     -mtune=native, as it was changed by the driver.  */
  	  || !strcmp (ix86_tune_string, "native"))
  	{
! 	  if (TARGET_64BIT)
! 	    ix86_tune_string = "generic64";
! 	  else
! 	    ix86_tune_string = "generic32";
  	}
        /* If this call is for setting the option attribute, allow the
! 	 generic32/generic64 that was previously set.  */
        else if (!main_args_p
! 	       && (!strcmp (ix86_tune_string, "generic32")
! 		   || !strcmp (ix86_tune_string, "generic64")))
  	;
        else if (!strncmp (ix86_tune_string, "generic", 7))
          error ("bad value (%s) for %stune=%s %s",
--- 3211,3222 ----
  	     -mtune=native, as it was changed by the driver.  */
  	  || !strcmp (ix86_tune_string, "native"))
  	{
! 	  ix86_tune_string = "generic";
  	}
        /* If this call is for setting the option attribute, allow the
! 	 generic that was previously set.  */
        else if (!main_args_p
! 	       && !strcmp (ix86_tune_string, "generic"))
  	;
        else if (!strncmp (ix86_tune_string, "generic", 7))
          error ("bad value (%s) for %stune=%s %s",
*************** ix86_option_override_internal (bool main
*** 3330,3339 ****
  	  || !strcmp (ix86_tune_string, "x86-64")
  	  || !strcmp (ix86_tune_string, "i686"))
  	{
! 	  if (TARGET_64BIT)
! 	    ix86_tune_string = "generic64";
! 	  else
! 	    ix86_tune_string = "generic32";
  	}
      }
  
--- 3242,3248 ----
  	  || !strcmp (ix86_tune_string, "x86-64")
  	  || !strcmp (ix86_tune_string, "i686"))
  	{
! 	  ix86_tune_string = "generic";
  	}
      }
  
*************** ix86_option_override_internal (bool main
*** 3630,3649 ****
  			 "instruction set");
  	      }
  	  }
- 	else
- 	  {
- 	    /* Adjust tuning when compiling for 32-bit ABI.  */
- 	    switch (ix86_tune)
- 	      {
- 	      case PROCESSOR_GENERIC64:
- 		ix86_tune = PROCESSOR_GENERIC32;
- 		ix86_schedule = CPU_PENTIUMPRO;
- 		break;
- 
- 	      default:
- 		break;
- 	      }
- 	  }
  	/* Intel CPUs have always interpreted SSE prefetch instructions as
  	   NOPs; so, we can enable SSE prefetch instructions even when
  	   -mtune (rather than -march) points us to a processor that has them.
--- 3539,3544 ----
*************** ix86_issue_rate (void)
*** 24503,24510 ****
      case PROCESSOR_K8:
      case PROCESSOR_AMDFAM10:
      case PROCESSOR_NOCONA:
!     case PROCESSOR_GENERIC32:
!     case PROCESSOR_GENERIC64:
      case PROCESSOR_BDVER1:
      case PROCESSOR_BDVER2:
      case PROCESSOR_BDVER3:
--- 24398,24404 ----
      case PROCESSOR_K8:
      case PROCESSOR_AMDFAM10:
      case PROCESSOR_NOCONA:
!     case PROCESSOR_GENERIC:
      case PROCESSOR_BDVER1:
      case PROCESSOR_BDVER2:
      case PROCESSOR_BDVER3:
*************** ix86_adjust_cost (rtx insn, rtx link, rt
*** 24768,24775 ****
      case PROCESSOR_BTVER1:
      case PROCESSOR_BTVER2:
      case PROCESSOR_ATOM:
!     case PROCESSOR_GENERIC32:
!     case PROCESSOR_GENERIC64:
        memory = get_attr_memory (insn);
  
        /* Show ability of reorder buffer to hide latency of load by executing
--- 24662,24668 ----
      case PROCESSOR_BTVER1:
      case PROCESSOR_BTVER2:
      case PROCESSOR_ATOM:
!     case PROCESSOR_GENERIC:
        memory = get_attr_memory (insn);
  
        /* Show ability of reorder buffer to hide latency of load by executing


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]