aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/MachO/ArchitectureSet.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-04-30 11:50:09 +0300
committerMartin Storsjö <martin@martin.st>2020-05-30 09:22:09 +0300
commitcf97e0ec42b800ade5a18401a35ada96f355693f (patch)
tree67de4f4570dcec0d8647e832cb55a87dff61811e /llvm/lib/TextAPI/MachO/ArchitectureSet.cpp
parent2388a096e7865c043e83ece4e26654bd3d1a20d5 (diff)
downloadllvm-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