This is the mail archive of the
mailing list for the GCC project.
Re: X18 on AArch64
- From: pinskia at gmail dot com
- To: AndrÃ Hentschel <nerv at dawncrow dot de>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 7 Jul 2015 14:01:45 -0700
- Subject: Re: X18 on AArch64
- Authentication-results: sourceware.org; auth=none
- References: <559C36CD dot 5060304 at dawncrow dot de>
What does the elf abi say about x18, I thought it was just another temp. If the target does not use it as a platform reg. Note there are many assembly files which might use x18 also due to that.
So this means you need wrapper functions when moving between the different abis. Nothing much can be done in gcc really. Please push this back to wine instead.
Also I think windows had a bad choice of using x18 when there was a system register already for tls.
> On Jul 7, 2015, at 1:30 PM, AndrÃ Hentschel <firstname.lastname@example.org> wrote:
> Hi all,
> Note: I'm new to that mailinglist...
> On AArch64 X18 is used as a platform register for some platforms, so to generate portable executables it should not be used by the compiler.
> The use case i have for this is Wine. Windows arm64 programs use X18 as TLS register, thus it shouldn't be changed, otherwise it leads to a crash.
> I worked on a patch , but realized that X17 is a bad choice (IP registers should be avoided on arm64 for the chain register it seems...),
> so I wonder which register would be better. Something from X9-X15?
> See also the bug report containing the patch:
>  https://bugs.winehq.org/show_bug.cgi?id=38780