Commit cfe1b18f by Vladimir Makarov Committed by Vladimir Makarov

2006-10-27 Vladimir Makarov <vmakarov@redhat.com>

	* config/i386/i386.h (TARGET_GEODE):
	(TARGET_CPU_CPP_BUILTINS): Add code for geode.
	(TARGET_CPU_DEFAULT_geode): New macro.
	(TARGET_CPU_DEFAULT_k6, TARGET_CPU_DEFAULT_k6_2,
	TARGET_CPU_DEFAULT_k6_3, TARGET_CPU_DEFAULT_athlon,
	TARGET_CPU_DEFAULT_athlon_sse, TARGET_CPU_DEFAULT_k8,
	TARGET_CPU_DEFAULT_pentium_m, TARGET_CPU_DEFAULT_prescott,
	TARGET_CPU_DEFAULT_nocona, TARGET_CPU_DEFAULT_generic): Increase
	the macro values.
	(TARGET_CPU_DEFAULT_NAMES): Add geode.
	(processor_type): Add PROCESSOR_GEODE.

	* config/i386/i386.md: Include geode.md.
	(cpu): Add geode.

	* config/i386/i386.c (geode_cost): New initialized global
	variable.
	(m_GEODE, m_K6_GEODE): New macros.
	(x86_use_leave, x86_push_memory, x86_deep_branch, x86_use_sahf,
	x86_use_himode_fiop, x86_promote_QImode, x86_add_esp_4,
	x86_add_esp_8, x86_rep_movl_optimal, x86_ext_80387_constants,
	x86_schedule): Use m_K6_GEODE instead of m_K6.
	(x86_movx, x86_cmove): Set up m_GEODE.
	(x86_integer_DFmode_moves): Clear m_GEODE.
	(processor_target_table): Add entry for geode.
	(processor_alias_table): Ditto.

	* config/i386/geode.md: New file.

	* doc/invoke.texi: Add entry about geode processor.

From-SVN: r118090
parent 2810ec2f
2006-10-27 Vladimir Makarov <vmakarov@redhat.com>
* config/i386/i386.h (TARGET_GEODE):
(TARGET_CPU_CPP_BUILTINS): Add code for geode.
(TARGET_CPU_DEFAULT_geode): New macro.
(TARGET_CPU_DEFAULT_k6, TARGET_CPU_DEFAULT_k6_2,
TARGET_CPU_DEFAULT_k6_3, TARGET_CPU_DEFAULT_athlon,
TARGET_CPU_DEFAULT_athlon_sse, TARGET_CPU_DEFAULT_k8,
TARGET_CPU_DEFAULT_pentium_m, TARGET_CPU_DEFAULT_prescott,
TARGET_CPU_DEFAULT_nocona, TARGET_CPU_DEFAULT_generic): Increase
the macro values.
(TARGET_CPU_DEFAULT_NAMES): Add geode.
(processor_type): Add PROCESSOR_GEODE.
* config/i386/i386.md: Include geode.md.
(cpu): Add geode.
* config/i386/i386.c (geode_cost): New initialized global
variable.
(m_GEODE, m_K6_GEODE): New macros.
(x86_use_leave, x86_push_memory, x86_deep_branch, x86_use_sahf,
x86_use_himode_fiop, x86_promote_QImode, x86_add_esp_4,
x86_add_esp_8, x86_rep_movl_optimal, x86_ext_80387_constants,
x86_schedule): Use m_K6_GEODE instead of m_K6.
(x86_movx, x86_cmove): Set up m_GEODE.
(x86_integer_DFmode_moves): Clear m_GEODE.
(processor_target_table): Add entry for geode.
(processor_alias_table): Ditto.
* config/i386/geode.md: New file.
* doc/invoke.texi: Add entry about geode processor.
2006-10-27 Mike Stump <mrs@apple.com> 2006-10-27 Mike Stump <mrs@apple.com>
* config/darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and * config/darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and
......
;; Geode Scheduling
;; Copyright (C) 2006
;; Free Software Foundation, Inc.
;;
;; This file is part of GCC.
;;
;; GCC is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; GCC is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GCC; see the file COPYING. If not, write to
;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;
;; The Geode architecture is one insn issue processor.
;;
;; This description is based on data from the following documents:
;;
;; "AMD Geode GX Processor Data Book"
;; Advanced Micro Devices, Inc., Aug 2005.
;;
;; "AMD Geode LX Processor Data Book"
;; Advanced Micro Devices, Inc., Jan 2006.
;;
;;
;; CPU execution units of the Geode:
;;
;; issue describes the issue pipeline.
;; alu describes the Integer unit
;; fpu describes the FP unit
;;
;; The fp unit is out of order execution unit with register renaming.
;; There is also memory management unit and execution pipeline for
;; load/store operations. We ignore it and difference between insns
;; using memory and registers.
(define_automaton "geode")
(define_cpu_unit "geode_issue,geode_alu,geode_fpu" "geode")
(define_insn_reservation "alu" 1
(and (eq_attr "cpu" "geode")
(eq_attr "type" "alu,alu1,negnot,icmp,lea,test,imov,imovx,icmov,incdec,setcc"))
"geode_issue,geode_alu")
(define_insn_reservation "shift" 2
(and (eq_attr "cpu" "geode")
(eq_attr "type" "ishift,ishift1,rotate,rotate1,cld"))
"geode_issue,geode_alu*2")
(define_insn_reservation "imul" 7
(and (eq_attr "cpu" "geode")
(eq_attr "type" "imul"))
"geode_issue,geode_alu*7")
(define_insn_reservation "idiv" 40
(and (eq_attr "cpu" "geode")
(eq_attr "type" "idiv"))
"geode_issue,geode_alu*40")
;; The branch unit.
(define_insn_reservation "call" 2
(and (eq_attr "cpu" "geode")
(eq_attr "type" "call,callv"))
"geode_issue,geode_alu*2")
(define_insn_reservation "geode_branch" 1
(and (eq_attr "cpu" "geode")
(eq_attr "type" "ibr"))
"geode_issue,geode_alu")
(define_insn_reservation "geode_pop_push" 1
(and (eq_attr "cpu" "geode")
(eq_attr "type" "pop,push"))
"geode_issue,geode_alu")
(define_insn_reservation "geode_leave" 2
(and (eq_attr "cpu" "geode")
(eq_attr "type" "leave"))
"geode_issue,geode_alu*2")
(define_insn_reservation "geode_load_str" 4
(and (eq_attr "cpu" "geode")
(and (eq_attr "type" "str")
(eq_attr "memory" "load,both")))
"geode_issue,geode_alu*4")
(define_insn_reservation "geode_store_str" 2
(and (eq_attr "cpu" "geode")
(and (eq_attr "type" "str")
(eq_attr "memory" "store")))
"geode_issue,geode_alu*2")
;; Be optimistic
(define_insn_reservation "geode_unknown" 1
(and (eq_attr "cpu" "geode")
(eq_attr "type" "multi,other"))
"geode_issue,geode_alu")
;; FPU
(define_insn_reservation "geode_fop" 6
(and (eq_attr "cpu" "geode")
(eq_attr "type" "fop,fcmp"))
"geode_issue,geode_fpu*6")
(define_insn_reservation "geode_fsimple" 1
(and (eq_attr "cpu" "geode")
(eq_attr "type" "fmov,fcmov,fsgn,fxch"))
"geode_issue,geode_fpu")
(define_insn_reservation "geode_fist" 4
(and (eq_attr "cpu" "geode")
(eq_attr "type" "fistp,fisttp"))
"geode_issue,geode_fpu*4")
(define_insn_reservation "geode_fmul" 10
(and (eq_attr "cpu" "geode")
(eq_attr "type" "fmul"))
"geode_issue,geode_fpu*10")
(define_insn_reservation "geode_fdiv" 47
(and (eq_attr "cpu" "geode")
(eq_attr "type" "fdiv"))
"geode_issue,geode_fpu*47")
;; We use minimal latency (fsin) here
(define_insn_reservation "geode_fpspc" 54
(and (eq_attr "cpu" "geode")
(eq_attr "type" "fpspc"))
"geode_issue,geode_fpu*54")
(define_insn_reservation "geode_frndint" 12
(and (eq_attr "cpu" "geode")
(eq_attr "type" "frndint"))
"geode_issue,geode_fpu*12")
(define_insn_reservation "geode_mmxmov" 1
(and (eq_attr "cpu" "geode")
(eq_attr "type" "mmxmov"))
"geode_issue,geode_fpu")
(define_insn_reservation "geode_mmx" 2
(and (eq_attr "cpu" "geode")
(eq_attr "type" "mmx,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft"))
"geode_issue,geode_fpu*2")
...@@ -334,6 +334,60 @@ struct processor_costs pentiumpro_cost = { ...@@ -334,6 +334,60 @@ struct processor_costs pentiumpro_cost = {
}; };
static const static const
struct processor_costs geode_cost = {
COSTS_N_INSNS (1), /* cost of an add instruction */
COSTS_N_INSNS (1), /* cost of a lea instruction */
COSTS_N_INSNS (2), /* 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 (7), /* SI */
COSTS_N_INSNS (7), /* DI */
COSTS_N_INSNS (7)}, /* other */
0, /* cost of multiply per each bit set */
{COSTS_N_INSNS (15), /* cost of a divide/mod for QI */
COSTS_N_INSNS (23), /* HI */
COSTS_N_INSNS (39), /* SI */
COSTS_N_INSNS (39), /* DI */
COSTS_N_INSNS (39)}, /* other */
COSTS_N_INSNS (1), /* cost of movsx */
COSTS_N_INSNS (1), /* cost of movzx */
8, /* "large" insn */
4, /* MOVE_RATIO */
1, /* cost for loading QImode using movzbl */
{1, 1, 1}, /* cost of loading integer registers
in QImode, HImode and SImode.
Relative to reg-reg move (2). */
{1, 1, 1}, /* cost of storing integer registers */
1, /* cost of reg,reg fld/fst */
{1, 1, 1}, /* cost of loading fp registers
in SFmode, DFmode and XFmode */
{4, 6, 6}, /* cost of storing fp registers
in SFmode, DFmode and XFmode */
1, /* cost of moving MMX register */
{1, 1}, /* cost of loading MMX registers
in SImode and DImode */
{1, 1}, /* cost of storing MMX registers
in SImode and DImode */
1, /* cost of moving SSE register */
{1, 1, 1}, /* cost of loading SSE registers
in SImode, DImode and TImode */
{1, 1, 1}, /* cost of storing SSE registers
in SImode, DImode and TImode */
1, /* MMX or SSE register to integer */
32, /* size of prefetch block */
1, /* number of parallel prefetches */
1, /* Branch cost */
COSTS_N_INSNS (6), /* cost of FADD and FSUB insns. */
COSTS_N_INSNS (11), /* cost of FMUL instruction. */
COSTS_N_INSNS (47), /* cost of FDIV instruction. */
COSTS_N_INSNS (1), /* cost of FABS instruction. */
COSTS_N_INSNS (1), /* cost of FCHS instruction. */
COSTS_N_INSNS (54), /* cost of FSQRT instruction. */
};
static const
struct processor_costs k6_cost = { struct processor_costs k6_cost = {
COSTS_N_INSNS (1), /* cost of an add instruction */ COSTS_N_INSNS (1), /* cost of an add instruction */
COSTS_N_INSNS (2), /* cost of a lea instruction */ COSTS_N_INSNS (2), /* cost of a lea instruction */
...@@ -719,6 +773,8 @@ const struct processor_costs *ix86_cost = &pentium_cost; ...@@ -719,6 +773,8 @@ const struct processor_costs *ix86_cost = &pentium_cost;
#define m_486 (1<<PROCESSOR_I486) #define m_486 (1<<PROCESSOR_I486)
#define m_PENT (1<<PROCESSOR_PENTIUM) #define m_PENT (1<<PROCESSOR_PENTIUM)
#define m_PPRO (1<<PROCESSOR_PENTIUMPRO) #define m_PPRO (1<<PROCESSOR_PENTIUMPRO)
#define m_GEODE (1<<PROCESSOR_GEODE)
#define m_K6_GEODE (m_K6 | m_GEODE)
#define m_K6 (1<<PROCESSOR_K6) #define m_K6 (1<<PROCESSOR_K6)
#define m_ATHLON (1<<PROCESSOR_ATHLON) #define m_ATHLON (1<<PROCESSOR_ATHLON)
#define m_PENT4 (1<<PROCESSOR_PENTIUM4) #define m_PENT4 (1<<PROCESSOR_PENTIUM4)
...@@ -735,22 +791,22 @@ const struct processor_costs *ix86_cost = &pentium_cost; ...@@ -735,22 +791,22 @@ const struct processor_costs *ix86_cost = &pentium_cost;
/* Leave is not affecting Nocona SPEC2000 results negatively, so enabling for /* Leave is not affecting Nocona SPEC2000 results negatively, so enabling for
Generic64 seems like good code size tradeoff. We can't enable it for 32bit Generic64 seems like good code size tradeoff. We can't enable it for 32bit
generic because it is not working well with PPro base chips. */ generic because it is not working well with PPro base chips. */
const int x86_use_leave = m_386 | m_K6 | m_ATHLON_K8 | m_GENERIC64; const int x86_use_leave = m_386 | m_K6_GEODE | m_ATHLON_K8 | m_GENERIC64;
const int x86_push_memory = m_386 | m_K6 | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_push_memory = m_386 | m_K6_GEODE | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_zero_extend_with_and = m_486 | m_PENT; const int x86_zero_extend_with_and = m_486 | m_PENT;
const int x86_movx = m_ATHLON_K8 | m_PPRO | m_PENT4 | m_NOCONA | m_GENERIC /* m_386 | m_K6 */; const int x86_movx = m_ATHLON_K8 | m_PPRO | m_PENT4 | m_NOCONA | m_GENERIC | m_GEODE /* m_386 | m_K6 */;
const int x86_double_with_add = ~m_386; const int x86_double_with_add = ~m_386;
const int x86_use_bit_test = m_386; const int x86_use_bit_test = m_386;
const int x86_unroll_strlen = m_486 | m_PENT | m_PPRO | m_ATHLON_K8 | m_K6 | m_GENERIC; const int x86_unroll_strlen = m_486 | m_PENT | m_PPRO | m_ATHLON_K8 | m_K6 | m_GENERIC;
const int x86_cmove = m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA; const int x86_cmove = m_PPRO | m_GEODE | m_ATHLON_K8 | m_PENT4 | m_NOCONA;
const int x86_3dnow_a = m_ATHLON_K8; const int x86_3dnow_a = m_ATHLON_K8;
const int x86_deep_branch = m_PPRO | m_K6 | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_deep_branch = m_PPRO | m_K6_GEODE | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC;
/* Branch hints were put in P4 based on simulation result. But /* Branch hints were put in P4 based on simulation result. But
after P4 was made, no performance benefit was observed with after P4 was made, no performance benefit was observed with
branch hints. It also increases the code size. As the result, branch hints. It also increases the code size. As the result,
icc never generates branch hints. */ icc never generates branch hints. */
const int x86_branch_hints = 0; const int x86_branch_hints = 0;
const int x86_use_sahf = m_PPRO | m_K6 | m_PENT4 | m_NOCONA | m_GENERIC32; /*m_GENERIC | m_ATHLON_K8 ? */ const int x86_use_sahf = m_PPRO | m_K6_GEODE | m_PENT4 | m_NOCONA | m_GENERIC32; /*m_GENERIC | m_ATHLON_K8 ? */
/* We probably ought to watch for partial register stalls on Generic32 /* We probably ought to watch for partial register stalls on Generic32
compilation setting as well. However in current implementation the compilation setting as well. However in current implementation the
partial register stalls are not eliminated very well - they can partial register stalls are not eliminated very well - they can
...@@ -761,14 +817,14 @@ const int x86_use_sahf = m_PPRO | m_K6 | m_PENT4 | m_NOCONA | m_GENERIC32; /*m_G ...@@ -761,14 +817,14 @@ const int x86_use_sahf = m_PPRO | m_K6 | m_PENT4 | m_NOCONA | m_GENERIC32; /*m_G
to leave it off for generic32 for now. */ to leave it off for generic32 for now. */
const int x86_partial_reg_stall = m_PPRO; const int x86_partial_reg_stall = m_PPRO;
const int x86_partial_flag_reg_stall = m_GENERIC; const int x86_partial_flag_reg_stall = m_GENERIC;
const int x86_use_himode_fiop = m_386 | m_486 | m_K6; const int x86_use_himode_fiop = m_386 | m_486 | m_K6_GEODE;
const int x86_use_simode_fiop = ~(m_PPRO | m_ATHLON_K8 | m_PENT | m_GENERIC); const int x86_use_simode_fiop = ~(m_PPRO | m_ATHLON_K8 | m_PENT | m_GENERIC);
const int x86_use_mov0 = m_K6; const int x86_use_mov0 = m_K6;
const int x86_use_cltd = ~(m_PENT | m_K6 | m_GENERIC); const int x86_use_cltd = ~(m_PENT | m_K6 | m_GENERIC);
const int x86_read_modify_write = ~m_PENT; const int x86_read_modify_write = ~m_PENT;
const int x86_read_modify = ~(m_PENT | m_PPRO); const int x86_read_modify = ~(m_PENT | m_PPRO);
const int x86_split_long_moves = m_PPRO; const int x86_split_long_moves = m_PPRO;
const int x86_promote_QImode = m_K6 | m_PENT | m_386 | m_486 | m_ATHLON_K8 | m_GENERIC; /* m_PENT4 ? */ const int x86_promote_QImode = m_K6_GEODE | m_PENT | m_386 | m_486 | m_ATHLON_K8 | m_GENERIC; /* m_PENT4 ? */
const int x86_fast_prefix = ~(m_PENT | m_486 | m_386); const int x86_fast_prefix = ~(m_PENT | m_486 | m_386);
const int x86_single_stringop = m_386 | m_PENT4 | m_NOCONA; const int x86_single_stringop = m_386 | m_PENT4 | m_NOCONA;
const int x86_qimode_math = ~(0); const int x86_qimode_math = ~(0);
...@@ -780,9 +836,9 @@ const int x86_himode_math = ~(m_PPRO); ...@@ -780,9 +836,9 @@ const int x86_himode_math = ~(m_PPRO);
const int x86_promote_hi_regs = m_PPRO; const int x86_promote_hi_regs = m_PPRO;
const int x86_sub_esp_4 = m_ATHLON_K8 | m_PPRO | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_sub_esp_4 = m_ATHLON_K8 | m_PPRO | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_sub_esp_8 = m_ATHLON_K8 | m_PPRO | m_386 | m_486 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_sub_esp_8 = m_ATHLON_K8 | m_PPRO | m_386 | m_486 | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_add_esp_4 = m_ATHLON_K8 | m_K6 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_add_esp_4 = m_ATHLON_K8 | m_K6_GEODE | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_add_esp_8 = m_ATHLON_K8 | m_PPRO | m_K6 | m_386 | m_486 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_add_esp_8 = m_ATHLON_K8 | m_PPRO | m_K6_GEODE | m_386 | m_486 | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_integer_DFmode_moves = ~(m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO | m_GENERIC); const int x86_integer_DFmode_moves = ~(m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO | m_GENERIC | m_GEODE);
const int x86_partial_reg_dependency = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_partial_reg_dependency = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_memory_mismatch_stall = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_memory_mismatch_stall = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_accumulate_outgoing_args = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO | m_GENERIC; const int x86_accumulate_outgoing_args = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO | m_GENERIC;
...@@ -808,18 +864,18 @@ const int x86_sse_split_regs = m_ATHLON_K8; ...@@ -808,18 +864,18 @@ const int x86_sse_split_regs = m_ATHLON_K8;
const int x86_sse_typeless_stores = m_ATHLON_K8; const int x86_sse_typeless_stores = m_ATHLON_K8;
const int x86_sse_load0_by_pxor = m_PPRO | m_PENT4 | m_NOCONA; const int x86_sse_load0_by_pxor = m_PPRO | m_PENT4 | m_NOCONA;
const int x86_use_ffreep = m_ATHLON_K8; const int x86_use_ffreep = m_ATHLON_K8;
const int x86_rep_movl_optimal = m_386 | m_PENT | m_PPRO | m_K6; const int x86_rep_movl_optimal = m_386 | m_PENT | m_PPRO | m_K6_GEODE;
const int x86_use_incdec = ~(m_PENT4 | m_NOCONA | m_GENERIC); const int x86_use_incdec = ~(m_PENT4 | m_NOCONA | m_GENERIC);
/* ??? Allowing interunit moves makes it all too easy for the compiler to put /* ??? Allowing interunit moves makes it all too easy for the compiler to put
integer data in xmm registers. Which results in pretty abysmal code. */ integer data in xmm registers. Which results in pretty abysmal code. */
const int x86_inter_unit_moves = 0 /* ~(m_ATHLON_K8) */; const int x86_inter_unit_moves = 0 /* ~(m_ATHLON_K8) */;
const int x86_ext_80387_constants = m_K6 | m_ATHLON | m_PENT4 | m_NOCONA | m_PPRO | m_GENERIC32; const int x86_ext_80387_constants = m_K6_GEODE | m_ATHLON | m_PENT4 | m_NOCONA | m_PPRO | m_GENERIC32;
/* Some CPU cores are not able to predict more than 4 branch instructions in /* Some CPU cores are not able to predict more than 4 branch instructions in
the 16 byte window. */ the 16 byte window. */
const int x86_four_jump_limit = m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC; const int x86_four_jump_limit = m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_GENERIC;
const int x86_schedule = m_PPRO | m_ATHLON_K8 | m_K6 | m_PENT | m_GENERIC; const int x86_schedule = m_PPRO | m_ATHLON_K8 | m_K6_GEODE | m_PENT | m_GENERIC;
const int x86_use_bt = m_ATHLON_K8; const int x86_use_bt = m_ATHLON_K8;
/* Compare and exchange was added for 80486. */ /* Compare and exchange was added for 80486. */
const int x86_cmpxchg = ~m_386; const int x86_cmpxchg = ~m_386;
...@@ -1453,6 +1509,7 @@ override_options (void) ...@@ -1453,6 +1509,7 @@ override_options (void)
{&i486_cost, 0, 0, 16, 15, 16, 15, 16}, {&i486_cost, 0, 0, 16, 15, 16, 15, 16},
{&pentium_cost, 0, 0, 16, 7, 16, 7, 16}, {&pentium_cost, 0, 0, 16, 7, 16, 7, 16},
{&pentiumpro_cost, 0, 0, 16, 15, 16, 7, 16}, {&pentiumpro_cost, 0, 0, 16, 15, 16, 7, 16},
{&geode_cost, 0, 0, 0, 0, 0, 0, 0},
{&k6_cost, 0, 0, 32, 7, 32, 7, 32}, {&k6_cost, 0, 0, 32, 7, 32, 7, 32},
{&athlon_cost, 0, 0, 16, 7, 16, 7, 16}, {&athlon_cost, 0, 0, 16, 7, 16, 7, 16},
{&pentium4_cost, 0, 0, 0, 0, 0, 0, 0}, {&pentium4_cost, 0, 0, 0, 0, 0, 0, 0},
...@@ -1505,6 +1562,8 @@ override_options (void) ...@@ -1505,6 +1562,8 @@ override_options (void)
| PTA_MMX | PTA_PREFETCH_SSE}, | PTA_MMX | PTA_PREFETCH_SSE},
{"nocona", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_64BIT {"nocona", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_64BIT
| PTA_MMX | PTA_PREFETCH_SSE}, | PTA_MMX | PTA_PREFETCH_SSE},
{"geode", PROCESSOR_GEODE, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
| PTA_3DNOW_A},
{"k6", PROCESSOR_K6, PTA_MMX}, {"k6", PROCESSOR_K6, PTA_MMX},
{"k6-2", PROCESSOR_K6, PTA_MMX | PTA_3DNOW}, {"k6-2", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},
{"k6-3", PROCESSOR_K6, PTA_MMX | PTA_3DNOW}, {"k6-3", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},
......
...@@ -130,6 +130,7 @@ extern const struct processor_costs *ix86_cost; ...@@ -130,6 +130,7 @@ extern const struct processor_costs *ix86_cost;
#define TARGET_486 (ix86_tune == PROCESSOR_I486) #define TARGET_486 (ix86_tune == PROCESSOR_I486)
#define TARGET_PENTIUM (ix86_tune == PROCESSOR_PENTIUM) #define TARGET_PENTIUM (ix86_tune == PROCESSOR_PENTIUM)
#define TARGET_PENTIUMPRO (ix86_tune == PROCESSOR_PENTIUMPRO) #define TARGET_PENTIUMPRO (ix86_tune == PROCESSOR_PENTIUMPRO)
#define TARGET_GEODE (ix86_tune == PROCESSOR_GEODE)
#define TARGET_K6 (ix86_tune == PROCESSOR_K6) #define TARGET_K6 (ix86_tune == PROCESSOR_K6)
#define TARGET_ATHLON (ix86_tune == PROCESSOR_ATHLON) #define TARGET_ATHLON (ix86_tune == PROCESSOR_ATHLON)
#define TARGET_PENTIUM4 (ix86_tune == PROCESSOR_PENTIUM4) #define TARGET_PENTIUM4 (ix86_tune == PROCESSOR_PENTIUM4)
...@@ -375,6 +376,10 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); ...@@ -375,6 +376,10 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
break; \ break; \
} \ } \
} \ } \
else if (TARGET_GEODE) \
{ \
builtin_define ("__tune_geode__"); \
} \
else if (TARGET_K6) \ else if (TARGET_K6) \
{ \ { \
builtin_define ("__tune_k6__"); \ builtin_define ("__tune_k6__"); \
...@@ -438,6 +443,11 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); ...@@ -438,6 +443,11 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
builtin_define ("__pentiumpro"); \ builtin_define ("__pentiumpro"); \
builtin_define ("__pentiumpro__"); \ builtin_define ("__pentiumpro__"); \
} \ } \
else if (ix86_arch == PROCESSOR_GEODE) \
{ \
builtin_define ("__geode"); \
builtin_define ("__geode__"); \
} \
else if (ix86_arch == PROCESSOR_K6) \ else if (ix86_arch == PROCESSOR_K6) \
{ \ { \
\ \
...@@ -482,20 +492,21 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); ...@@ -482,20 +492,21 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define TARGET_CPU_DEFAULT_pentium2 5 #define TARGET_CPU_DEFAULT_pentium2 5
#define TARGET_CPU_DEFAULT_pentium3 6 #define TARGET_CPU_DEFAULT_pentium3 6
#define TARGET_CPU_DEFAULT_pentium4 7 #define TARGET_CPU_DEFAULT_pentium4 7
#define TARGET_CPU_DEFAULT_k6 8 #define TARGET_CPU_DEFAULT_geode 8
#define TARGET_CPU_DEFAULT_k6_2 9 #define TARGET_CPU_DEFAULT_k6 9
#define TARGET_CPU_DEFAULT_k6_3 10 #define TARGET_CPU_DEFAULT_k6_2 10
#define TARGET_CPU_DEFAULT_athlon 11 #define TARGET_CPU_DEFAULT_k6_3 11
#define TARGET_CPU_DEFAULT_athlon_sse 12 #define TARGET_CPU_DEFAULT_athlon 12
#define TARGET_CPU_DEFAULT_k8 13 #define TARGET_CPU_DEFAULT_athlon_sse 13
#define TARGET_CPU_DEFAULT_pentium_m 14 #define TARGET_CPU_DEFAULT_k8 14
#define TARGET_CPU_DEFAULT_prescott 15 #define TARGET_CPU_DEFAULT_pentium_m 15
#define TARGET_CPU_DEFAULT_nocona 16 #define TARGET_CPU_DEFAULT_prescott 16
#define TARGET_CPU_DEFAULT_generic 17 #define TARGET_CPU_DEFAULT_nocona 17
#define TARGET_CPU_DEFAULT_generic 18
#define TARGET_CPU_DEFAULT_NAMES {"i386", "i486", "pentium", "pentium-mmx",\ #define TARGET_CPU_DEFAULT_NAMES {"i386", "i486", "pentium", "pentium-mmx",\
"pentiumpro", "pentium2", "pentium3", \ "pentiumpro", "pentium2", "pentium3", \
"pentium4", "k6", "k6-2", "k6-3",\ "pentium4", "geode", "k6", "k6-2", "k6-3", \
"athlon", "athlon-4", "k8", \ "athlon", "athlon-4", "k8", \
"pentium-m", "prescott", "nocona", \ "pentium-m", "prescott", "nocona", \
"generic"} "generic"}
...@@ -2067,6 +2078,7 @@ enum processor_type ...@@ -2067,6 +2078,7 @@ enum processor_type
PROCESSOR_I486, /* 80486DX, 80486SX, 80486DX[24] */ PROCESSOR_I486, /* 80486DX, 80486SX, 80486DX[24] */
PROCESSOR_PENTIUM, PROCESSOR_PENTIUM,
PROCESSOR_PENTIUMPRO, PROCESSOR_PENTIUMPRO,
PROCESSOR_GEODE,
PROCESSOR_K6, PROCESSOR_K6,
PROCESSOR_ATHLON, PROCESSOR_ATHLON,
PROCESSOR_PENTIUM4, PROCESSOR_PENTIUM4,
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
;; Processor type. This attribute must exactly match the processor_type ;; Processor type. This attribute must exactly match the processor_type
;; enumeration in i386.h. ;; enumeration in i386.h.
(define_attr "cpu" "i386,i486,pentium,pentiumpro,k6,athlon,pentium4,k8,nocona,generic32,generic64" (define_attr "cpu" "i386,i486,pentium,pentiumpro,geode,k6,athlon,pentium4,k8,nocona,generic32,generic64"
(const (symbol_ref "ix86_tune"))) (const (symbol_ref "ix86_tune")))
;; A basic instruction type. Refinements due to arguments to be ;; A basic instruction type. Refinements due to arguments to be
...@@ -480,6 +480,7 @@ ...@@ -480,6 +480,7 @@
(include "ppro.md") (include "ppro.md")
(include "k6.md") (include "k6.md")
(include "athlon.md") (include "athlon.md")
(include "geode.md")
;; Operand and operator predicates and constraints ;; Operand and operator predicates and constraints
......
...@@ -9290,6 +9290,8 @@ implemented for this chip.) ...@@ -9290,6 +9290,8 @@ implemented for this chip.)
@item c3-2 @item c3-2
Via C3-2 CPU with MMX and SSE instruction set support. (No scheduling is Via C3-2 CPU with MMX and SSE instruction set support. (No scheduling is
implemented for this chip.) implemented for this chip.)
@item geode
Embedded AMD CPU with MMX and 3dNOW! instruction set support.
@end table @end table
While picking a specific @var{cpu-type} will schedule things appropriately While picking a specific @var{cpu-type} will schedule things appropriately
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment