diff mbox

[avr] Fix PR54220

Message ID 5044E39B.7020301@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay Sept. 3, 2012, 5:06 p.m. UTC
This implements TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS as
obvious fix for PR54220.

Ok to install?

Johann


	PR target/54220
	* config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New
	define to...
	(avr_allocate_stack_slots_for_args): ...this new static function.

Comments

Denis Chertykov Sept. 4, 2012, 6:17 a.m. UTC | #1
2012/9/3 Georg-Johann Lay <avr@gjlay.de>:
> This implements TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS as
> obvious fix for PR54220.
>
> Ok to install?
>
> Johann
>
>
>         PR target/54220
>         * config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New
>         define to...
>         (avr_allocate_stack_slots_for_args): ...this new static function.

Approved.

Denis.
diff mbox

Patch

Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	(revision 190873)
+++ gcc/config/avr/avr.c	(working copy)
@@ -700,6 +700,16 @@  avr_regs_to_save (HARD_REG_SET *set)
   return count;
 }
 
+
+/* Implement `TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS' */
+
+static bool
+avr_allocate_stack_slots_for_args (void)
+{
+  return !cfun->machine->is_naked;
+}
+
+
 /* Return true if register FROM can be eliminated via register TO.  */
 
 static bool
@@ -11339,6 +11349,9 @@  avr_fold_builtin (tree fndecl, int n_arg
 #undef  TARGET_CAN_ELIMINATE
 #define TARGET_CAN_ELIMINATE avr_can_eliminate
 
+#undef  TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS
+#define TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS avr_allocate_stack_slots_for_args
+
 #undef TARGET_WARN_FUNC_RETURN
 #define TARGET_WARN_FUNC_RETURN avr_warn_func_return