code generation for arm targets
Richard Earnshaw
rearnsha@arm.com
Wed Mar 22 10:11:00 GMT 2000
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.
More information about the Gcc
mailing list