From 007e61c28bd45792a74a66be4feae5968468befe Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Fri, 23 May 2008 20:36:57 +0000 Subject: extend.texi: Clarify use of __attribute__((naked)). gcc/ 2008-05-23 Paul Brook Carlos O'Donell * 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 Carlos O'Donell * gcc.target/arm/naked-1.c: New test. * gcc.target/arm/naked-2.c: New test. Co-Authored-By: Carlos O'Donell From-SVN: r135831 --- gcc/function.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 29d4c1e..5f9c3a5 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1776,6 +1776,9 @@ aggregate_value_p (const_tree exp, const_tree fntype) bool use_register_for_decl (const_tree decl) { + if (!targetm.calls.allocate_stack_slots_for_args()) + return true; + /* Honor volatile. */ if (TREE_SIDE_EFFECTS (decl)) return false; -- cgit v1.1