OSDN Git Service

Backport from 2012-09-04 mainline r190914
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Sep 2012 09:14:36 +0000 (09:14 +0000)
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Sep 2012 09:14:36 +0000 (09:14 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@190916 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/avr/avr.c

index b02832e..cde310d 100644 (file)
@@ -1,3 +1,12 @@
+2012-09-04  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+       Backport from 2012-09-04 mainline r190914
+
+       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.
+
 2012-09-03  H.J. Lu  <hongjiu.lu@intel.com>
 
        Backported from mainline
index 50682f2..709ba61 100644 (file)
@@ -674,6 +674,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
@@ -10930,6 +10940,9 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *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_CLASS_LIKELY_SPILLED_P
 #define TARGET_CLASS_LIKELY_SPILLED_P avr_class_likely_spilled_p