This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Static Chain Register on iOS AArch64


Hello,

I noticed the following comment in the GCC source (
https://github.com/gcc-mirror/gcc/blob/7c62dfbbcd3699efcbbadc9fb3aa14f23a123add/libffi/src/aarch64/ffitarget.h#L66
):

/* 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:
http://comments.gmane.org/gmane.comp.compilers.llvm.devel/86370

Thanks,
Stephen Cross


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]