This is the mail archive of the
mailing list for the GCC project.
Static Chain Register on iOS AArch64
- From: Stephen Cross <scross at scross dot co dot uk>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 3 Jun 2015 23:55:57 +0100
- Subject: Static Chain Register on iOS AArch64
- Authentication-results: sourceware.org; auth=none
I noticed the following comment in the GCC source (
/* iOS reserves x18 for the system. Disable Go closures until a new
static chain is chosen. */
Based on this comment, it sounds as if GCC hasn't yet decided which register
to use for the static chain pointer on iOS AArch64. Is this correct?
As I understand it, x18 (the platform register) is not used on Linux and hence
can be used by GCC. I couldn't find anything saying this, so could you confirm
this (that x18 is not used by Linux and hence used by GCC)?
In terms of the register to choose for iOS AArch64, it seems like either x16 or
x17 (the Intra Procedural call scratch registers) would be a good choice, in
the same way that r12 is used for ARM 32-bit. Does this seem sensible, or
is there some reason for rejecting these registers?
I'd appreciate anything anyone can tell me about the above.
In case you're interested, the context for this is: