Register r9 in the ARM ABI
rth at twiddle.net
Fri Mar 1 16:55:10 CET 2013
On 02/28/2013 11:41 PM, Niels Möller wrote:
> I have a general ARM question, that maybe Richard or someone else on the
> list can answer.
>>From the ABI documentation I've read, register r9 is in some way
> reserved for implementation of things like thread local storage. If I
> write a leaf function (not calling anybody else, and not using thread
> local storage), can a use r9 like any other callee-save register or not?
> The only potential problem case I see is if my function is interupted by
> a signal, and the signal handler expects the value in register r9 to be
Roland McGrath has recently been adjusting this in glibc for Google's ARM
Na(tive)Cl(ient) ABI, so I suspect they want this register untouched all the time.
FWIW, it doesn't matter for Linux. There we use CP15 for the thread pointer,
copied as needed to a core register.
More information about the gmp-devel