[PATCH] D145131: [Arm][AArch64] Setting IsX18ReservedByDefault() to true for Unknown OSes

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 03:26:02 PST 2023


DavidSpickett added a comment.

Yes I made a mistake here, I didn't think of "unknown" as including bare metal.

https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#general-purpose-registers

> If the platform ABI has no such requirements, then it should use r18 as an additional temporary register. The platform ABI specification must document the usage for this register.

Which reads as a very "must opt into reserving x18" situation, rather than default to reserving it.

Potentially the better way to do this is to use the `-ffixed-x18` option if you have an unknown OS but you know it reserves x18.


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