trong added inline comments. Herald added a project: LLVM.
================ Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:318 + if (Args.hasArg(options::OPT_ffixed_x0)) + Features.push_back("+reserve-x0"); ---------------- phosek wrote: > 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. Yes, if x0 is reserved, it can't be used to pass arguments. But what happens if x0 is used to return a value? For example: ``` int foo() { return 1; } ``` It would be helpful if compiling `foo()` with x0 reserved threw an error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56305/new/ https://reviews.llvm.org/D56305 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits