aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r--gcc/config/i386/i386.c112
1 files changed, 56 insertions, 56 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 41461d5..9e46b7b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -834,53 +834,58 @@ struct ptt
{
const char *const name; /* processor name */
const struct processor_costs *cost; /* Processor costs */
- 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;
+
+ /* Default alignments. */
+ const char *const align_loop;
+ const char *const align_jump;
+ const char *const align_label;
+ const char *const align_func;
};
/* This table must be in sync with enum processor_type in i386.h. */
static const struct ptt processor_target_table[PROCESSOR_max] =
{
- {"generic", &generic_cost, 16, 10, 16, 10, 16},
- {"i386", &i386_cost, 4, 3, 4, 3, 4},
- {"i486", &i486_cost, 16, 15, 16, 15, 16},
- {"pentium", &pentium_cost, 16, 7, 16, 7, 16},
- {"lakemont", &lakemont_cost, 16, 7, 16, 7, 16},
- {"pentiumpro", &pentiumpro_cost, 16, 15, 16, 10, 16},
- {"pentium4", &pentium4_cost, 0, 0, 0, 0, 0},
- {"nocona", &nocona_cost, 0, 0, 0, 0, 0},
- {"core2", &core_cost, 16, 10, 16, 10, 16},
- {"nehalem", &core_cost, 16, 10, 16, 10, 16},
- {"sandybridge", &core_cost, 16, 10, 16, 10, 16},
- {"haswell", &core_cost, 16, 10, 16, 10, 16},
- {"bonnell", &atom_cost, 16, 15, 16, 7, 16},
- {"silvermont", &slm_cost, 16, 15, 16, 7, 16},
- {"goldmont", &slm_cost, 16, 15, 16, 7, 16},
- {"goldmont-plus", &slm_cost, 16, 15, 16, 7, 16},
- {"tremont", &slm_cost, 16, 15, 16, 7, 16},
- {"knl", &slm_cost, 16, 15, 16, 7, 16},
- {"knm", &slm_cost, 16, 15, 16, 7, 16},
- {"skylake", &skylake_cost, 16, 10, 16, 10, 16},
- {"skylake-avx512", &skylake_cost, 16, 10, 16, 10, 16},
- {"cannonlake", &skylake_cost, 16, 10, 16, 10, 16},
- {"icelake-client", &skylake_cost, 16, 10, 16, 10, 16},
- {"icelake-server", &skylake_cost, 16, 10, 16, 10, 16},
- {"intel", &intel_cost, 16, 15, 16, 7, 16},
- {"geode", &geode_cost, 0, 0, 0, 0, 0},
- {"k6", &k6_cost, 32, 7, 32, 7, 32},
- {"athlon", &athlon_cost, 16, 7, 16, 7, 16},
- {"k8", &k8_cost, 16, 7, 16, 7, 16},
- {"amdfam10", &amdfam10_cost, 32, 24, 32, 7, 32},
- {"bdver1", &bdver1_cost, 16, 10, 16, 7, 11},
- {"bdver2", &bdver2_cost, 16, 10, 16, 7, 11},
- {"bdver3", &bdver3_cost, 16, 10, 16, 7, 11},
- {"bdver4", &bdver4_cost, 16, 10, 16, 7, 11},
- {"btver1", &btver1_cost, 16, 10, 16, 7, 11},
- {"btver2", &btver2_cost, 16, 10, 16, 7, 11},
- {"znver1", &znver1_cost, 16, 15, 16, 15, 16}
+/* The "0:0:8" label alignment specified for some processors generates
+ secondary 8-byte alignment only for those label/jump/loop targets
+ which have primary alignment. */
+
+ {"generic", &generic_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"i386", &i386_cost, "4", "4", NULL, "4" },
+ {"i486", &i486_cost, "16", "16", "0:0:8", "16"},
+ {"pentium", &pentium_cost, "16:8:8", "16:8:8", "0:0:8", "16"},
+ {"lakemont", &lakemont_cost, "16:8:8", "16:8:8", "0:0:8", "16"},
+ {"pentiumpro", &pentiumpro_cost, "16", "16:11:8", "0:0:8", "16"},
+ {"pentium4", &pentium4_cost, NULL, NULL, NULL, NULL},
+ {"nocona", &nocona_cost, NULL, NULL, NULL, NULL},
+ {"core2", &core_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"nehalem", &core_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"sandybridge", &core_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"haswell", &core_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"bonnell", &atom_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"silvermont", &slm_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"goldmont", &slm_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"goldmont-plus", &slm_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"tremont", &slm_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"knl", &slm_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"knm", &slm_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"skylake", &skylake_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"skylake-avx512", &skylake_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"cannonlake", &skylake_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"icelake-client", &skylake_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"icelake-server", &skylake_cost, "16:11:8", "16:11:8", "0:0:8", "16"},
+ {"intel", &intel_cost, "16", "16:8:8", "0:0:8", "16"},
+ {"geode", &geode_cost, NULL, NULL, NULL, NULL},
+ {"k6", &k6_cost, "32:8:8", "32:8:8", "0:0:8", "32"},
+ {"athlon", &athlon_cost, "16:8:8", "16:8:8", "0:0:8", "16"},
+ {"k8", &k8_cost, "16:8:8", "16:8:8", "0:0:8", "16"},
+ {"amdfam10", &amdfam10_cost, "32:25:8", "32:8:8", "0:0:8", "32"},
+ {"bdver1", &bdver1_cost, "16:11:8", "16:8:8", "0:0:8", "11"},
+ {"bdver2", &bdver2_cost, "16:11:8", "16:8:8", "0:0:8", "11"},
+ {"bdver3", &bdver3_cost, "16:11:8", "16:8:8", "0:0:8", "11"},
+ {"bdver4", &bdver4_cost, "16:11:8", "16:8:8", "0:0:8", "11"},
+ {"btver1", &btver1_cost, "16:11:8", "16:8:8", "0:0:8", "11"},
+ {"btver2", &btver2_cost, "16:11:8", "16:8:8", "0:0:8", "11"},
+ {"znver1", &znver1_cost, "16", "16", "0:0:8", "16"}
};
static unsigned int
@@ -3365,20 +3370,15 @@ set_ix86_tune_features (enum processor_type ix86_tune, bool dump)
static void
ix86_default_align (struct gcc_options *opts)
{
- if (opts->x_align_loops == 0)
- {
- opts->x_align_loops = processor_target_table[ix86_tune].align_loop;
- align_loops_max_skip = processor_target_table[ix86_tune].align_loop_max_skip;
- }
- if (opts->x_align_jumps == 0)
- {
- opts->x_align_jumps = processor_target_table[ix86_tune].align_jump;
- align_jumps_max_skip = processor_target_table[ix86_tune].align_jump_max_skip;
- }
- if (opts->x_align_functions == 0)
- {
- opts->x_align_functions = processor_target_table[ix86_tune].align_func;
- }
+ /* -falign-foo without argument: supply one. */
+ if (opts->x_flag_align_loops && !opts->x_str_align_loops)
+ opts->x_str_align_loops = processor_target_table[ix86_tune].align_loop;
+ if (opts->x_flag_align_jumps && !opts->x_str_align_jumps)
+ opts->x_str_align_jumps = processor_target_table[ix86_tune].align_jump;
+ if (opts->x_flag_align_labels && !opts->x_str_align_labels)
+ opts->x_str_align_labels = processor_target_table[ix86_tune].align_label;
+ if (opts->x_flag_align_functions && !opts->x_str_align_functions)
+ opts->x_str_align_functions = processor_target_table[ix86_tune].align_func;
}
/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE hook. */