This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: code generation for arm targets
- To: "Vadim Lebedev" <vlebedev at aplio dot fr>
- Subject: Re: code generation for arm targets
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 22 Mar 2000 18:11:45 +0000
- Cc: "Gcc at Gcc dot Gnu dot Org" <gcc at gcc dot gnu dot org>
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
vlebedev@aplio.fr said:
> 28 str lr, [sp, #-4]!
> Take a look at line 28.
> The lr register is saved in the "unallocated" stack area. The stack
> pointer is updated to include local variables frame only at line 33.
> Wouln't it be safer (with respect to interrupt and signal handling) to
> update the stack pointer immiedately upon entering the function?
Take another look. The store is a pre-decrement write -- that's what the
'!' is for. The instruction allocates a word of stack as it writes the
location, so there is no problem.
R.