From: Vladimir Makarov Date: Sat, 18 Nov 2006 18:43:19 +0000 (+0000) Subject: invoke.texi (core2): Add item. X-Git-Tag: releases/gcc-4.3.0~8403 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05f85dbb6d432b042168f029d5da62f1d4672844;p=thirdparty%2Fgcc.git invoke.texi (core2): Add item. 2006-11-18 Vladimir Makarov * doc/invoke.texi (core2): Add item. * config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New macros. (TARGET_CPU_CPP_BUILTINS): Add code for core2. (TARGET_CPU_DEFAULT_generic): Change value. (TARGET_CPU_DEFAULT_NAMES): Add core2. (processor_type): Add new constant PROCESSOR_CORE2. * config/i386/i386.md (cpu): Add core2. * config/i386/i386.c (core2_cost): New initialized variable. (m_CORE2): New macro. (x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen, x86_deep_branch, x86_partial_reg_stall, x86_use_simode_fiop, x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8, x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves, x86_partial_reg_dependency, x86_memory_mismatch_stall, x86_accumulate_outgoing_args, x86_prologue_using_move, x86_epilogue_using_move, x86_arch_always_fancy_math_387, x86_sse_partial_reg_dependency, x86_rep_movl_optimal, x86_use_incdec, x86_four_jump_limit, x86_schedule, x86_pad_returns): Add m_CORE2. (override_options): Add entries for Core2. (ix86_issue_rate): Add case for Core2. From-SVN: r118973 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d5e57043a8b..13deaefb239a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,31 @@ +2006-11-18 Vladimir Makarov + + * doc/invoke.texi (core2): Add item. + + * config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New + macros. + (TARGET_CPU_CPP_BUILTINS): Add code for core2. + (TARGET_CPU_DEFAULT_generic): Change value. + (TARGET_CPU_DEFAULT_NAMES): Add core2. + (processor_type): Add new constant PROCESSOR_CORE2. + + * config/i386/i386.md (cpu): Add core2. + + * config/i386/i386.c (core2_cost): New initialized variable. + (m_CORE2): New macro. + (x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen, + x86_deep_branch, x86_partial_reg_stall, x86_use_simode_fiop, + x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8, + x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves, + x86_partial_reg_dependency, x86_memory_mismatch_stall, + x86_accumulate_outgoing_args, x86_prologue_using_move, + x86_epilogue_using_move, x86_arch_always_fancy_math_387, + x86_sse_partial_reg_dependency, x86_rep_movl_optimal, + x86_use_incdec, x86_four_jump_limit, x86_schedule, + x86_pad_returns): Add m_CORE2. + (override_options): Add entries for Core2. + (ix86_issue_rate): Add case for Core2. + 2006-11-18 Aldy Hernandez * doc/invoke.texi: Fix mno-isel typo. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0946848ec9fa..0428bfacea58 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -658,6 +658,58 @@ struct processor_costs nocona_cost = { COSTS_N_INSNS (44), /* cost of FSQRT instruction. */ }; +static const +struct processor_costs core2_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 (3), /* HI */ + COSTS_N_INSNS (3), /* SI */ + COSTS_N_INSNS (3), /* DI */ + COSTS_N_INSNS (3)}, /* other */ + 0, /* cost of multiply per each bit set */ + {COSTS_N_INSNS (22), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (22), /* HI */ + COSTS_N_INSNS (22), /* SI */ + COSTS_N_INSNS (22), /* DI */ + COSTS_N_INSNS (22)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ + 8, /* "large" insn */ + 16, /* MOVE_RATIO */ + 2, /* cost for loading QImode using movzbl */ + {6, 6, 6}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {4, 4, 4}, /* cost of storing integer registers */ + 2, /* cost of reg,reg fld/fst */ + {6, 6, 6}, /* cost of loading fp registers + in SFmode, DFmode and XFmode */ + {4, 4, 4}, /* cost of loading integer registers */ + 2, /* cost of moving MMX register */ + {6, 6}, /* cost of loading MMX registers + in SImode and DImode */ + {4, 4}, /* cost of storing MMX registers + in SImode and DImode */ + 2, /* cost of moving SSE register */ + {6, 6, 6}, /* cost of loading SSE registers + in SImode, DImode and TImode */ + {4, 4, 4}, /* cost of storing SSE registers + in SImode, DImode and TImode */ + 2, /* MMX or SSE register to integer */ + 128, /* size of prefetch block */ + 8, /* number of parallel prefetches */ + 3, /* Branch cost */ + COSTS_N_INSNS (3), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (5), /* cost of FMUL instruction. */ + COSTS_N_INSNS (32), /* cost of FDIV instruction. */ + COSTS_N_INSNS (1), /* cost of FABS instruction. */ + COSTS_N_INSNS (1), /* cost of FCHS instruction. */ + COSTS_N_INSNS (58), /* cost of FSQRT instruction. */ +}; + /* Generic64 should produce code tuned for Nocona and K8. */ static const struct processor_costs generic64_cost = { @@ -787,26 +839,27 @@ const struct processor_costs *ix86_cost = &pentium_cost; #define m_K8 (1<