This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ARM] Allow profiling of nested functions on Thumb-1
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, paul at codesourcery dot com
- Date: Wed, 11 Nov 2009 13:24:21 +0000
- Subject: Re: [PATCH, ARM] Allow profiling of nested functions on Thumb-1
- References: <20091111130601.129cc268@rex.config>
On Wed, 2009-11-11 at 13:06 +0000, Julian Brown wrote:
> Hi,
>
> This patch fixes compiling code using nested functions with profiling
> enabled for Thumb-1. The ASM_OUTPUT_REG_{PUSH,POP} macros try to push
> STATIC_CHAIN_REGNUM, and Thumb-1 cannot do that directly. The problem
> is solved (rather dirtily) by pushing r7 first, then using it as a
> scratch register. (Those macros aren't used for anything non-profiling
> related.)
>
> Regtested with cross to ARM Linux. OK to apply?
>
> Julian
>
> ChangeLog
>
> gcc/
> * config/arm/arm.h (ASM_OUTPUT_REG_PUSH): Handle
> STATIC_CHAIN_REGNUM specially for Thumb-1.
> (ASM_OUTPUT_REG_POP): Likewise.
Please move the comment outside of the macro -- it's rather unwieldy in
the middle there, especially since the lines aren't terminated with
backslashes (is that even portable?).
Otherwise OK
R.