diff options
author | Martin Storsjö <martin@martin.st> | 2019-04-30 11:50:09 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-05-30 09:22:09 +0300 |
commit | cf97e0ec42b800ade5a18401a35ada96f355693f (patch) | |
tree | 67de4f4570dcec0d8647e832cb55a87dff61811e /llvm/lib/TextAPI/MachO/ArchitectureSet.cpp | |
parent | 2388a096e7865c043e83ece4e26654bd3d1a20d5 (diff) | |
download | llvm-cf97e0ec42b800ade5a18401a35ada96f355693f.zip llvm-cf97e0ec42b800ade5a18401a35ada96f355693f.tar.gz llvm-cf97e0ec42b800ade5a18401a35ada96f355693f.tar.bz2 |
[AArch64] Treat x18 as callee-saved in functions with windows calling convention on non-windows OSes
Treat it as callee-saved, and always back it up. When windows code calls
entry points in unix code, marked with the windows calling convention,
that unix code can call other functions that isn't compiled with
-ffixed-x18 which may clobber x18 freely. By backing it up and restoring
it on return, we preserve the register across the function call,
fulfilling this part of the windows calling convention on another OS.
This isn't enough for making sure that x18 is preseved when non-windows
code does a callback to windows code, but is a clear improvement over
the current status quo. Additionally, wine is nowadays building many
modules as PE DLLs, which avoids the callback issue altogether for those
DLLs.
Differential Revision: https://reviews.llvm.org/D61892
Diffstat (limited to 'llvm/lib/TextAPI/MachO/ArchitectureSet.cpp')
0 files changed, 0 insertions, 0 deletions