diff options
Diffstat (limited to 'gcc/config/m32r/m32r.c')
-rw-r--r-- | gcc/config/m32r/m32r.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index aefab93..f104457 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -104,6 +104,7 @@ static bool m32r_legitimate_constant_p (machine_mode, rtx); static bool m32r_attribute_identifier (const_tree); static bool m32r_hard_regno_mode_ok (unsigned int, machine_mode); static bool m32r_modes_tieable_p (machine_mode, machine_mode); +static HOST_WIDE_INT m32r_starting_frame_offset (void); /* M32R specific attributes. */ @@ -220,6 +221,9 @@ static const struct attribute_spec m32r_attribute_table[] = #undef TARGET_CONSTANT_ALIGNMENT #define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings +#undef TARGET_STARTING_FRAME_OFFSET +#define TARGET_STARTING_FRAME_OFFSET m32r_starting_frame_offset + struct gcc_target targetm = TARGET_INITIALIZER; /* Called by m32r_option_override to initialize various things. */ @@ -2959,3 +2963,12 @@ m32r_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x) && CONST_INT_P (XEXP (XEXP (x, 0), 1)) && UINTVAL (XEXP (XEXP (x, 0), 1)) > 32767); } + +/* Implement TARGET_STARTING_FRAME_OFFSET. The frame pointer points at + the same place as the stack pointer, except if alloca has been called. */ + +static HOST_WIDE_INT +m32r_starting_frame_offset (void) +{ + return M32R_STACK_ALIGN (crtl->outgoing_args_size); +} |