This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, ARM] Allow profiling of nested functions on Thumb-1


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]