Register r9 in the ARM ABI
tg at gmplib.org
Fri Mar 1 09:59:05 CET 2013
nisse at lysator.liu.se (Niels Möller) writes:
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
One way of answering such a question is to check wat GCC does for the C
code of the same package. Then follow the principle, "if GCC does it, I
may as well." :-)
I'll do 'objdump -dw file-with-large-function' in this case.
But the nerdiest way of figuring out these sort of things is reading
gcc/gcc/config/arm/arm.h, so that's wat I usually do.
More information about the gmp-devel