From b4e89e2d67f984f7d90a81185aa67dfdf6a1f7a1 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 28 Feb 2001 19:34:35 +0100 Subject: [PATCH] i386.c (pentium4_cost): New. * i386.c (pentium4_cost): New. (m_PENT4): New macro. (x86_push_memory, x86_movx,x86_cmove, x86_deep_branch, x86_use_sahf 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): Add Pentium4 (x86_use_q_reg, x86_use_any_reg): Kill. (override_options): Add pentium4. (incdec_operand): Return 0 for pentium4. (ix86_issue_rate): Add PROCESSOR_PENTIUM4 and PROCESSOR_ATHLON. * i386.h (x86_use_q_reg, x86_use_any_reg): Kill. (TARGET_PENTIUM4): Define. (enum processor_type): Add PROCESSOR_PENTIUM4. (CPP_CPU_DEFAULT_SPEC): Add pentium4 support. * i386.md (attribute "cpu"): Add pentium4. * invoke.texi (march): Add pentium4. From-SVN: r40134 --- gcc/ChangeLog | 19 +++++++++++ gcc/config/i386/i386.c | 71 +++++++++++++++++++++++++++++++---------- gcc/config/i386/i386.h | 11 +++++-- gcc/config/i386/i386.md | 2 +- gcc/invoke.texi | 6 ++-- 5 files changed, 86 insertions(+), 23 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ed7bbe3888..4db5d52e045 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +Wed Feb 28 19:31:42 CET 2001 Jan Hubicka + + * i386.c (pentium4_cost): New. + (m_PENT4): New macro. + (x86_push_memory, x86_movx,x86_cmove, x86_deep_branch, x86_use_sahf + 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): Add Pentium4 + (x86_use_q_reg, x86_use_any_reg): Kill. + (override_options): Add pentium4. + (incdec_operand): Return 0 for pentium4. + (ix86_issue_rate): Add PROCESSOR_PENTIUM4 and PROCESSOR_ATHLON. + * i386.h (x86_use_q_reg, x86_use_any_reg): Kill. + (TARGET_PENTIUM4): Define. + (enum processor_type): Add PROCESSOR_PENTIUM4. + (CPP_CPU_DEFAULT_SPEC): Add pentium4 support. + * i386.md (attribute "cpu"): Add pentium4. + * invoke.texi (march): Add pentium4. + Wed Feb 28 19:28:06 CET 2001 Jan Hubicka * i386.md (sse_mov?fcc*): New patterns and splitters. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index da323ab8450..d287d1a0a22 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -239,6 +239,38 @@ struct processor_costs athlon_cost = { 6 /* MMX or SSE register to integer */ }; +struct processor_costs pentium4_cost = { + 1, /* cost of an add instruction */ + 1, /* cost of a lea instruction */ + 8, /* variable shift costs */ + 8, /* constant shift costs */ + 30, /* cost of starting a multiply */ + 0, /* cost of multiply per each bit set */ + 112, /* cost of a divide/mod */ + 16, /* "large" insn */ + 6, /* MOVE_RATIO */ + 2, /* cost for loading QImode using movzbl */ + {4, 5, 4}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {2, 3, 2}, /* cost of storing integer registers */ + 2, /* cost of reg,reg fld/fst */ + {2, 2, 6}, /* cost of loading fp registers + in SFmode, DFmode and XFmode */ + {4, 4, 6}, /* cost of loading integer registers */ + 2, /* cost of moving MMX register */ + {2, 2}, /* cost of loading MMX registers + in SImode and DImode */ + {2, 2}, /* cost of storing MMX registers + in SImode and DImode */ + 12, /* cost of moving SSE register */ + {12, 12, 12}, /* cost of loading SSE registers + in SImode, DImode and TImode */ + {2, 2, 8}, /* cost of storing SSE registers + in SImode, DImode and TImode */ + 10, /* MMX or SSE register to integer */ +}; + struct processor_costs *ix86_cost = &pentium_cost; /* Processor feature/optimization bitmasks. */ @@ -248,19 +280,18 @@ struct processor_costs *ix86_cost = &pentium_cost; #define m_PPRO (1<