[PATCH] D56305: [AArch64] Support reserving arbitrary general purpose registers

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 16:17:36 PST 2019


phosek added a comment.

In D56305#1363417 <https://reviews.llvm.org/D56305#1363417>, @carwil wrote:

> Hi, we're currently working on similar functionality for the ARM backend, so I got pointed to take a look at this patch.
>  Looks good to me, I quite like the tablegen improvements, but agree with trong's comments.


Done.

> I assume you've omitted X19, as LLVM uses it as the base pointer?

Yes.



================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:318
 
+  if (Args.hasArg(options::OPT_ffixed_x0))
+    Features.push_back("+reserve-x0");
----------------
trong wrote:
> What happens (should happen) if we reserve x0 and compile a function with a return value?
Clang throws `error: AArch64 doesn't support function calls if any of the argument registers is reserved.` as for any other argument register.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56305/new/

https://reviews.llvm.org/D56305





More information about the llvm-commits mailing list