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: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "Uecker, Martin" <Martin dot Uecker at med dot uni-goettingen dot de>, "hainque at adacore dot com" <hainque at adacore dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Kyrylo Tkachov <Kyrylo dot Tkachov at arm dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>, nd <nd at arm dot com>
- Date: Mon, 17 Dec 2018 19:24:22 -0500 (EST)
- 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> ,<B9184F5B-B6D7-4537-9695-C5191C794333@adacore.com> <DB5PR08MB103081A8877309883FE3830C83A70@DB5PR08MB1030.eurprd08.prod.outlook.com>,<1544645040.23889.4.camel@med.uni-goettingen.de> <DB5PR08MB1030F6E82F66E0292C2D630D83A70@DB5PR08MB1030.eurprd08.prod.outlook.com>,<alpine.BSF.2.20.16.1812152226400.84446@arjuna.pair.com> <DB5PR08MB1030E68EF35E7BB54ADCF1ED83BC0@DB5PR08MB1030.eurprd08.prod.outlook.com> <alpine.BSF.2.20.16.1812171856060.12683@arjuna.pair.com>
On Mon, 17 Dec 2018, Hans-Peter Nilsson wrote:
> On Mon, 17 Dec 2018, Wilco Dijkstra wrote:
> > H-P:
> > > So, changing from R18 to R11 for aarch64 seems right, as the
> > > latter is call-clobbered and the former is call-saved IIUC.
> >
> > The AArch64 ABI defines x18 as platform specific:
> > http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf
> > On Linux it is call-clobbered, but it could be a fixed register on other
> > platforms (eg. a thread-local pointer). I don't think it's possible to make
> > it a callee-save.
>
> JFTR, in gcc, it's treated as call-saved, AFAICS, with no
> special-casing (other than being STATIC_CHAIN_REGNUM, which
> by itself has no other effect).
I take that back, My bad reading. Sorry for the noise.
brgds, H-P