[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 14 18:59:50 PST 2021


pengfei added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:3193
+def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group<m_Group>, Flags<[NoXarchOption]>,
+  HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">;
 def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
----------------
MaskRay wrote:
> nickdesaulniers wrote:
> > I think GCC support `-mno-skip-rax-setup` as well. Can you please add that (and tests for it) as well?  We don't need to actually handle it, I think, but we shouldn't warn about the flag being unsupported, for example.
> Consider `SimpleMFlag`
Thanks for the suggestion. I think adding a `-mno-skip-rax-setup` is simply here.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2197
 
+  if (Args.hasArg(options::OPT_mskip_rax_setup)) {
+    CmdArgs.push_back("-mllvm");
----------------
nickdesaulniers wrote:
> It might be nice to warn the user if this flag depends on `-mno-sse`.
GCC doesn't warn it either.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112413



More information about the llvm-commits mailing list