aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m32r/m32r.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/m32r/m32r.c')
-rw-r--r--gcc/config/m32r/m32r.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 93030ad..7b8b8fc 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -64,6 +64,7 @@ enum m32r_sdata m32r_sdata = M32R_SDATA_DEFAULT;
/* Forward declaration. */
static bool m32r_handle_option (size_t, const char *, int);
static void m32r_option_override (void);
+static void m32r_option_optimization (int, int);
static void init_reg_tables (void);
static void block_move_call (rtx, rtx, rtx);
static int m32r_is_insn (rtx);
@@ -153,6 +154,8 @@ static const struct attribute_spec m32r_attribute_table[] =
#define TARGET_HANDLE_OPTION m32r_handle_option
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE m32r_option_override
+#undef TARGET_OPTION_OPTIMIZATION
+#define TARGET_OPTION_OPTIMIZATION m32r_option_optimization
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
@@ -280,6 +283,18 @@ m32r_option_override (void)
SUBTARGET_OVERRIDE_OPTIONS;
}
+static void
+m32r_option_optimization (int level, int size)
+{
+ if (level == 1)
+ flag_regmove = 1;
+
+ if (size)
+ flag_omit_frame_pointer = 1;
+
+ SUBTARGET_OPTIMIZATION_OPTIONS;
+}
+
/* Vectors to keep interesting information about registers where it can easily
be got. We use to use the actual mode value as the bit number, but there
is (or may be) more than 32 modes now. Instead we use two tables: one