This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ping] Change static chain to r11 on aarch64
- From: Olivier Hainque <hainque at adacore dot com>
- To: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- Cc: Olivier Hainque <hainque at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, Kyrylo Tkachov <Kyrylo dot Tkachov at arm dot com>, James Greenhalgh <james dot greenhalgh at arm dot com>
- Date: Wed, 12 Dec 2018 18:48:40 +0100
- Subject: Re: [ping] Change static chain to r11 on aarch64
- References: <CE69209B-F89F-4F7D-95DD-18867F153CFF@adacore.com> <54925765-e00a-e2b5-ec47-267659c8039d@arm.com>
Hi Richard,
Thanks for your feedback on this !
> On 12 Dec 2018, at 18:21, Richard Earnshaw (lists) <Richard.Earnshaw@arm.com> wrote:
>
> libffi is a separate project; so a patch for that needs to be sent to
> the libffi maintainers.
Oh, I hadn't realized that.
> However, that introduces an issue that that
> code is potentially used across multiple versions of gcc, with
> potentially different choices of the static chain register. Hmm, this
> might need some more careful thought....
Indeed.
> I'm also not keen on the fact that we are now seriously eating into the
> space of call clobbered registers; what's the argument behind your
> selection of r11 as opposed to any other register?
No super strong motivation for r11 in particular.
The primary goal is to get to something else than r18 to
accommodate configurations where r18 is used by the runtime
environment, as allowed by the ABI and which at least VxWorks
leverages.
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01125.html
suggested r9, then I discovered that r9 and r10 were used
by the stack probing mechanism, so I just picked the following
one that didn't seem to be used for other purposes already.
> On Arm we manage
> with IP; is there some reason why we can't do something similar on AArch64?
I am unfortunately not familiar enough with the port to tell
out of the top of my head.
Maybe Kyrill, James or Wilco (cc'ed) would know ?