On 24/04/18 03:22, Jay K wrote: > I'm wondering what is the role of r9 on ARM32, on Linux and Android.
It's another callee-saved register and has no other special purpose. This is defined in the https://sourcery.mentor.com/GNUToolchain/kbattach142/arm_gnu_linux_abi.pdf which is the linux-specific platform binding information for the ARM EABI (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html) R. > On Apple it is documented as long ago reserved, these days available for > scratch. > > I've looked around a bit but haven't gotten the full answer. > > It is "the PIC register", I see. > > What does that imply? Volatile? Von-volatile? > > In particular I'm looking for a spare register, to pass an extra "special" > parameter in, that can be considered volatile and never otherwise has a > parameter. > > Most ABIs have a few candidates, but arm32 comes up relatively short. > > Intra procedural scratch (r12) probably cannot work for me. > I know gcc uses it for nested function context and that is laudable. I wish I > could guarantee no code between me setting it and it being consumed. > > And if it is volatile, I'd want the dynamic linker stubs to still preserve it > incoming. > > Thank you, > - Jay >