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]

Re: X18 on AArch64


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. 

Thanks,
Andrew



> On Jul 7, 2015, at 1:30 PM, Andrà Hentschel <nerv@dawncrow.de> 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 [1], 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:
> [1] https://bugs.winehq.org/show_bug.cgi?id=38780


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