ARM setjmp and r12
Nick Clifton
nickc@redhat.com
Fri Apr 28 14:16:00 GMT 2006
Hi Shaun,
> On the ARM, why does setjmp preserve r12 (ip)? I believe r12 is
> caller-preserved, not callee-preserved.
>
> arm/setjmp.S:122
> /* Save all the callee-preserved registers into the jump buffer. */
> stmea a1!, { v1-v7, fp, ip, sp, lr }
I *think* that this is because GCC uses it as the static chain register
for nested functions (when operating in ARM mode).
Cheers
Nick
More information about the Newlib
mailing list