[PATCH] D145131: [Arm][AArch64] Setting IsX18ReservedByDefault() to true for Unknown OSes
Lucas Prates via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 03:38:02 PST 2023
pratlucas added a comment.
I agree with @dmgreen, this doesn't seem to be the right default behaviour according to the ABI. I understand it can be useful for building cross-platform code, but "unknown" also affects other use cases such as bare metal targets.
As @DavidSpickett mentioned above, there are existing command line options that allow the user to opt-in to this behaviour, as recommended by the AAPCS64 document when creating platform-independent code:
> Software developers creating platform-independent code are advised to avoid using r18 if at all possible. Most compilers provide a mechanism to prevent specific registers from being used for general allocation;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145131/new/
https://reviews.llvm.org/D145131
More information about the llvm-commits
mailing list