diff options
author | carlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-23 20:36:57 +0000 |
---|---|---|
committer | carlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-23 20:36:57 +0000 |
commit | 658e203c9c9fb27b576911037bd432523335a93a (patch) | |
tree | fabe76f974542d0458d609ec4222651293549585 /gcc/config/arm | |
parent | 0ac9b10f0d143d299c2979bbc09038bf3dc6c9d8 (diff) | |
download | gcc-658e203c9c9fb27b576911037bd432523335a93a.tar.gz |
gcc/
2008-05-23 Paul Brook <paul@codesourcery.com>
Carlos O'Donell <carlos@codesourcery.com>
* doc/extend.texi: Clarify use of __attribute__((naked)).
* doc/tm.texi: Document TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS.
* target.h (gcc_target): Add allocate_stack_slots_for_args.
* function.c (use_register_for_decl): Use
targetm.calls.allocate_stack_slots_for_args.
* target-def.h (TARGET_CALLS): Add
TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS.
* config/arm/arm.c (arm_allocate_stack_slots_for_args):
New function.
(TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
gcc/testsuite/
2008-05-23 Paul Brook <paul@codesourcery.com>
Carlos O'Donell <carlos@codesourcery.com>
* gcc.target/arm/naked-1.c: New test.
* gcc.target/arm/naked-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 1c7002b8be4..38d4a2d9d9f 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -189,6 +189,7 @@ static bool arm_cannot_copy_insn_p (rtx); static bool arm_tls_symbol_p (rtx x); static int arm_issue_rate (void); static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; +static bool arm_allocate_stack_slots_for_args (void); /* Initialize the GCC target structure. */ @@ -289,6 +290,9 @@ static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS arm_setup_incoming_varargs +#undef TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS +#define TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS arm_allocate_stack_slots_for_args + #undef TARGET_DEFAULT_SHORT_ENUMS #define TARGET_DEFAULT_SHORT_ENUMS arm_default_short_enums @@ -1619,6 +1623,14 @@ arm_current_func_type (void) return cfun->machine->func_type; } + +bool +arm_allocate_stack_slots_for_args (void) +{ + /* Naked functions should not allocate stack slots for arguments. */ + return !IS_NAKED (arm_current_func_type ()); +} + /* Return 1 if it is possible to return using a single instruction. If SIBLING is non-null, this is a test for a return before a sibling |