This is the mail archive of the gcc@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]

Re: code generation for arm targets



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.



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