aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStan Cox <coxs@gnu.org>1997-01-31 21:10:10 +0000
committerStan Cox <coxs@gnu.org>1997-01-31 21:10:10 +0000
commit856b07a15774986e00506b65b891c494d7ef6be2 (patch)
tree1fcd1f207b230ea3d7419ea77eac3315ebc259b1 /gcc
parent36cf4bcf8646fb1413e6ed61f9f76b23274df643 (diff)
downloadgcc-856b07a15774986e00506b65b891c494d7ef6be2.zip
gcc-856b07a15774986e00506b65b891c494d7ef6be2.tar.gz
gcc-856b07a15774986e00506b65b891c494d7ef6be2.tar.bz2
(pentiumpro_cost): Added new cost structure for pentiumpro.
From-SVN: r13571
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a4591f0..85b422f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -80,13 +80,23 @@ struct processor_costs i486_cost = { /* 486 specific costs */
struct processor_costs pentium_cost = {
1, /* cost of an add instruction */
1, /* cost of a lea instruction */
- 3, /* variable shift costs */
+ 4, /* variable shift costs */
1, /* constant shift costs */
- 12, /* cost of starting a multiply */
- 1, /* cost of multiply per each bit set */
+ 11, /* cost of starting a multiply */
+ 0, /* cost of multiply per each bit set */
25 /* cost of a divide/mod */
};
+struct processor_costs pentiumpro_cost = {
+ 1, /* cost of an add instruction */
+ 1, /* cost of a lea instruction */
+ 3, /* variable shift costs */
+ 1, /* constant shift costs */
+ 4, /* cost of starting a multiply */
+ 0, /* cost of multiply per each bit set */
+ 17 /* cost of a divide/mod */
+};
+
struct processor_costs *ix86_cost = &pentium_cost;
#define AT_BP(mode) (gen_rtx (MEM, (mode), frame_pointer_rtx))
@@ -182,8 +192,8 @@ override_options ()
{PROCESSOR_I486_STRING, PROCESSOR_I486, &i486_cost, 0, 0},
{PROCESSOR_I586_STRING, PROCESSOR_PENTIUM, &pentium_cost, 0, 0},
{PROCESSOR_PENTIUM_STRING, PROCESSOR_PENTIUM, &pentium_cost, 0, 0},
- {PROCESSOR_I686_STRING, PROCESSOR_PENTIUMPRO, &pentium_cost, 0, 0},
- {PROCESSOR_PENTIUMPRO_STRING, PROCESSOR_PENTIUMPRO, &pentium_cost, 0, 0}};
+ {PROCESSOR_I686_STRING, PROCESSOR_PENTIUMPRO, &pentiumpro_cost, 0, 0},
+ {PROCESSOR_PENTIUMPRO_STRING, PROCESSOR_PENTIUMPRO, &pentiumpro_cost, 0, 0}};
int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
@@ -246,6 +256,7 @@ override_options ()
if (! strcmp (ix86_cpu_string, processor_target_table[j].name))
{
ix86_cpu = processor_target_table[j].processor;
+ ix86_cost = processor_target_table[j].cost;
if (i > j && (int)ix86_arch >= (int)PROCESSOR_PENTIUMPRO)
error ("-mcpu=%s does not support -march=%s", ix86_cpu_string, ix86_arch_string);