This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: ARM setjmp and r12
- From: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- To: "Nick Clifton" <nickc at redhat dot com>, "Shaun Jackman" <sjackman at gmail dot com>
- Cc: <newlib at sources dot redhat dot com>
- Date: Fri, 28 Apr 2006 16:05:46 +0200
- Subject: RE: ARM setjmp and r12
> > 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).
Would that even be legal? Shouldn't the contents/layout of jmpbuf be
specified by the ABI? Or how would different implementations
interoperate?
Regards,
Konrad Schwarz