aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-11-11 01:35:31 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2001-11-11 00:35:31 +0000
commit2cca7283a38b4645bc5501578dacd1ff02df3942 (patch)
tree155dcbed4737fbe4a4c5d7dc4012a7669f301b86 /gcc
parent2f0b7af6989a1b64490b19cc814d6843eb755f86 (diff)
downloadgcc-2cca7283a38b4645bc5501578dacd1ff02df3942.zip
gcc-2cca7283a38b4645bc5501578dacd1ff02df3942.tar.gz
gcc-2cca7283a38b4645bc5501578dacd1ff02df3942.tar.bz2
final.c (*_MAX_SKIP): Use *_max_skip variables.
* final.c (*_MAX_SKIP): Use *_max_skip variables. * flags.h (align_loops_max_skip, align_jumps_max_skip, align_labels_max_skip): New global variables. * toplev.c (align_loops_max_skip, align_jumps_max_skip, align_labels_max_skip): New global variables. (toplev_main): Set new variables. * i386.c (override_options): Set max_skip values. From-SVN: r46919
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.c30
-rw-r--r--gcc/final.c6
-rw-r--r--gcc/flags.h3
-rw-r--r--gcc/toplev.c9
5 files changed, 45 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f1c1ee8..471cd31 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Sun Nov 11 01:26:00 CET 2001 Jan Hubicka <jh@suse.cz>
+
+ * final.c (*_MAX_SKIP): Use *_max_skip variables.
+ * flags.h (align_loops_max_skip, align_jumps_max_skip,
+ align_labels_max_skip): New global variables.
+ * toplev.c (align_loops_max_skip, align_jumps_max_skip,
+ align_labels_max_skip): New global variables.
+ (toplev_main): Set new variables.
+ * i386.c (override_options): Set max_skip values.
+
2001-11-10 Geoffrey Keating <geoffk@redhat.com>
* doc/tm.texi (Label Output): Document ASM_OUTPUT_LABEL_REF.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 47f8e78..db06683 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -796,19 +796,21 @@ override_options ()
const int target_enable; /* Target flags to enable. */
const int target_disable; /* Target flags to disable. */
const int align_loop; /* Default alignments. */
+ const int align_loop_max_skip;
const int align_jump;
+ const int align_jump_max_skip;
const int align_func;
const int branch_cost;
}
const processor_target_table[PROCESSOR_max] =
{
- {&i386_cost, 0, 0, 2, 2, 2, 1},
- {&i486_cost, 0, 0, 4, 4, 4, 1},
- {&pentium_cost, 0, 0, -4, -4, -4, 1},
- {&pentiumpro_cost, 0, 0, 4, -4, 4, 1},
- {&k6_cost, 0, 0, -5, -5, 4, 1},
- {&athlon_cost, 0, 0, 4, -4, 4, 1},
- {&pentium4_cost, 0, 0, 2, 2, 2, 1}
+ {&i386_cost, 0, 0, 4, 3, 4, 3, 4, 1},
+ {&i486_cost, 0, 0, 16, 15, 16, 15, 16, 1},
+ {&pentium_cost, 0, 0, 16, 7, 16, 7, 16, 1},
+ {&pentiumpro_cost, 0, 0, 16, 15, 16, 7, 16, 1},
+ {&k6_cost, 0, 0, 32, 7, 32, 7, 32, 1},
+ {&athlon_cost, 0, 0, 16, 7, 64, 7, 16, 1},
+ {&pentium4_cost, 0, 0, 0, 0, 0, 0, 0, 1}
};
static struct pta
@@ -967,11 +969,19 @@ override_options ()
/* Default align_* from the processor table. */
#define abs(n) (n < 0 ? -n : n)
if (align_loops == 0)
- align_loops = 1 << abs (processor_target_table[ix86_cpu].align_loop);
+ {
+ align_loops = processor_target_table[ix86_cpu].align_loop;
+ align_loops_max_skip = processor_target_table[ix86_cpu].align_loop_max_skip;
+ }
if (align_jumps == 0)
- align_jumps = 1 << abs (processor_target_table[ix86_cpu].align_jump);
+ {
+ align_jumps = processor_target_table[ix86_cpu].align_jump;
+ align_jumps_max_skip = processor_target_table[ix86_cpu].align_jump_max_skip;
+ }
if (align_functions == 0)
- align_functions = 1 << abs (processor_target_table[ix86_cpu].align_func);
+ {
+ align_functions = processor_target_table[ix86_cpu].align_func;
+ }
/* Validate -mpreferred-stack-boundary= value, or provide default.
The default of 128 bits is for Pentium III's SSE __m128, but we
diff --git a/gcc/final.c b/gcc/final.c
index d94eacf..f44fd31 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -775,7 +775,7 @@ get_attr_length (insn)
#endif
#ifndef LABEL_ALIGN_MAX_SKIP
-#define LABEL_ALIGN_MAX_SKIP (align_labels-1)
+#define LABEL_ALIGN_MAX_SKIP align_labels_max_skip
#endif
#ifndef LOOP_ALIGN
@@ -783,7 +783,7 @@ get_attr_length (insn)
#endif
#ifndef LOOP_ALIGN_MAX_SKIP
-#define LOOP_ALIGN_MAX_SKIP (align_loops-1)
+#define LOOP_ALIGN_MAX_SKIP align_loops_max_skip
#endif
#ifndef LABEL_ALIGN_AFTER_BARRIER
@@ -799,7 +799,7 @@ get_attr_length (insn)
#endif
#ifndef JUMP_ALIGN_MAX_SKIP
-#define JUMP_ALIGN_MAX_SKIP (align_jumps-1)
+#define JUMP_ALIGN_MAX_SKIP align_jumps_max_skip
#endif
#ifndef ADDR_VEC_ALIGN
diff --git a/gcc/flags.h b/gcc/flags.h
index 04c3ed9..e1de922 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -590,10 +590,13 @@ extern int g_switch_set;
extern int align_loops;
extern int align_loops_log;
+extern int align_loops_max_skip;
extern int align_jumps;
extern int align_jumps_log;
+extern int align_jumps_max_skip;
extern int align_labels;
extern int align_labels_log;
+extern int align_labels_max_skip;
extern int align_functions;
extern int align_functions_log;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index a542f43..84faf14 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -924,10 +924,13 @@ int flag_renumber_insns = 1;
int align_loops;
int align_loops_log;
+int align_loops_max_skip;
int align_jumps;
int align_jumps_log;
+int align_jumps_max_skip;
int align_labels;
int align_labels_log;
+int align_labels_max_skip;
int align_functions;
int align_functions_log;
@@ -4877,11 +4880,17 @@ toplev_main (argc, argv)
/* Set up the align_*_log variables, defaulting them to 1 if they
were still unset. */
if (align_loops <= 0) align_loops = 1;
+ if (align_loops_max_skip > align_loops || !align_loops)
+ align_loops_max_skip = align_loops - 1;
align_loops_log = floor_log2 (align_loops * 2 - 1);
if (align_jumps <= 0) align_jumps = 1;
+ if (align_jumps_max_skip > align_jumps || !align_jumps)
+ align_jumps_max_skip = align_jumps - 1;
align_jumps_log = floor_log2 (align_jumps * 2 - 1);
if (align_labels <= 0) align_labels = 1;
align_labels_log = floor_log2 (align_labels * 2 - 1);
+ if (align_labels_max_skip > align_labels || !align_labels)
+ align_labels_max_skip = align_labels - 1;
if (align_functions <= 0) align_functions = 1;
align_functions_log = floor_log2 (align_functions * 2 - 1);