From 68acadb1ff292f5f62cdeb5a17dcb92613087727 Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Sun, 12 Aug 2018 13:26:05 +0000 Subject: [PATCH] [NDS32] Enable -malways-align by default at -O1 and above. gcc/ * common/config/nds32/nds32-common.c (nds32_option_optimization_table): Enalbe -malways-align. From-SVN: r263495 --- gcc/ChangeLog | 5 +++++ gcc/common/config/nds32/nds32-common.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09ec7e4f7fd..59f48eedad6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-08-12 Chung-Ju Wu + + * common/config/nds32/nds32-common.c + (nds32_option_optimization_table): Enalbe -malways-align. + 2018-08-12 Chung-Ju Wu * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in diff --git a/gcc/common/config/nds32/nds32-common.c b/gcc/common/config/nds32/nds32-common.c index efe2e9d43d7..48236605118 100644 --- a/gcc/common/config/nds32/nds32-common.c +++ b/gcc/common/config/nds32/nds32-common.c @@ -95,6 +95,8 @@ static const struct default_options nds32_option_optimization_table[] = { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 1 }, /* Enable -mrelax-hint by default at all optimization levels. */ { OPT_LEVELS_ALL, OPT_mrelax_hint, NULL, 1 }, + /* Enalbe -malways-align by default at -O1 and above, but not -Os or -Og. */ + { OPT_LEVELS_1_PLUS_SPEED_ONLY, OPT_malways_align, NULL, 1 }, /* Enable -mv3push by default at -Os, but it is useless under V2 ISA. */ { OPT_LEVELS_SIZE, OPT_mv3push, NULL, 1 }, -- 2.30.2