From 89c43c0a0bdf4db3e857fc60aecba58793e41107 Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Fri, 2 Apr 2004 15:05:55 +0000 Subject: [PATCH] i386.h (TARGET_NOCONA): New macro. 2004-04-02 Vladimir Makarov * config/i386/i386.h (TARGET_NOCONA): New macro. (TARGET_CPU_CPP_BUILTINS): Add code for Nocona. (processor_type): Add PROCESSOR_NOCONA. * config/i386/i386.md (cpu): Add nocona to the attribute values. * config/i386/i386.c (nocona_cost): New variable. (m_NOCONA): New macro. (x86_push_memory, x86_movx, x86_cmove, x86_deep_branch, x86_branch_hints, x86_use_sahf, x86_single_stringop, 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_decompose_lea, x86_arch_always_fancy_math_387, x86_sse_partial_reg_dependency, x86_sse_load0_by_pxor, x86_ext_80387_constants, x86_four_jump_limit): (override_options): Add nocona_cost to processor_target_table. Set up PROCESSOR_NOCONA for Nocona entry in processor_alias_table. (incdec_operand): Prevent inc/dec generation for Nocona too. (ix86_issue_rate): Add PROCESSOR_NOCONA. From-SVN: r80353 --- gcc/ChangeLog | 23 +++++++++ gcc/config/i386/i386.c | 100 +++++++++++++++++++++++++++++----------- gcc/config/i386/i386.h | 9 ++++ gcc/config/i386/i386.md | 6 +-- 4 files changed, 109 insertions(+), 29 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e2410c3d32f..e9b7dbc7960 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2004-04-02 Vladimir Makarov + + * config/i386/i386.h (TARGET_NOCONA): New macro. + (TARGET_CPU_CPP_BUILTINS): Add code for Nocona. + (processor_type): Add PROCESSOR_NOCONA. + + * config/i386/i386.md (cpu): Add nocona to the attribute values. + + * config/i386/i386.c (nocona_cost): New variable. + (m_NOCONA): New macro. + (x86_push_memory, x86_movx, x86_cmove, x86_deep_branch, + x86_branch_hints, x86_use_sahf, x86_single_stringop, + 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_decompose_lea, x86_arch_always_fancy_math_387, + x86_sse_partial_reg_dependency, x86_sse_load0_by_pxor, + x86_ext_80387_constants, x86_four_jump_limit): + (override_options): Add nocona_cost to processor_target_table. + Set up PROCESSOR_NOCONA for Nocona entry in processor_alias_table. + (incdec_operand): Prevent inc/dec generation for Nocona too. + (ix86_issue_rate): Add PROCESSOR_NOCONA. + 2004-04-01 Andrew Pinski * rtlanal.c (find_reg_note): Manually diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ff4d4bf6482..f2da7e093b7 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -457,6 +457,50 @@ struct processor_costs pentium4_cost = { 43, /* cost of FSQRT instruction. */ }; +static const +struct processor_costs nocona_cost = { + 1, /* cost of an add instruction */ + 1, /* cost of a lea instruction */ + 1, /* variable shift costs */ + 1, /* constant shift costs */ + {10, 10, 10, 10, 10}, /* cost of starting a multiply */ + 0, /* cost of multiply per each bit set */ + {66, 66, 66, 66, 66}, /* cost of a divide/mod */ + 1, /* cost of movsx */ + 1, /* cost of movzx */ + 16, /* "large" insn */ + 9, /* 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 */ + 3, /* cost of reg,reg fld/fst */ + {12, 12, 12}, /* cost of loading fp registers + in SFmode, DFmode and XFmode */ + {4, 4, 4}, /* cost of loading integer registers */ + 6, /* cost of moving MMX register */ + {12, 12}, /* cost of loading MMX registers + in SImode and DImode */ + {12, 12}, /* cost of storing MMX registers + in SImode and DImode */ + 6, /* cost of moving SSE register */ + {12, 12, 12}, /* cost of loading SSE registers + in SImode, DImode and TImode */ + {12, 12, 12}, /* cost of storing SSE registers + in SImode, DImode and TImode */ + 8, /* MMX or SSE register to integer */ + 128, /* size of prefetch block */ + 8, /* number of parallel prefetches */ + 1, /* Branch cost */ + 6, /* cost of FADD and FSUB insns. */ + 8, /* cost of FMUL instruction. */ + 40, /* cost of FDIV instruction. */ + 3, /* cost of FABS instruction. */ + 3, /* cost of FCHS instruction. */ + 44, /* cost of FSQRT instruction. */ +}; + const struct processor_costs *ix86_cost = &pentium_cost; /* Processor feature/optimization bitmasks. */ @@ -469,19 +513,20 @@ const struct processor_costs *ix86_cost = &pentium_cost; #define m_PENT4 (1<