[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

Tiancong Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 11:31:07 PDT 2019


tcwang marked 4 inline comments as done.
tcwang added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:192
+  // En/disable crypto
+  if (Arg *A = Args.getLastArg(options::OPT_mcrypto, options::OPT_mnocrypto,
+                               options::OPT_mgeneral_regs_only)) {
----------------
manojgupta wrote:
> I believe this should be merged with the code for OPT_mgeneral_regs_only otherwise  the next if statement  for mgeneral-regs-only  would force "-crypto" .
> 
> if (A->getOption().matches(OPT_mgeneral_regs_only)))
> ..// disable crypto, neon etc.
> else if (A->getOption().matches(options::OPT_mcrypto))
> // enable crypto
> ...
> 
> Please also add tests when mgeneral-regs-only is specified with "-mcrypto"  before/after.
Understand. My question of the logic is that if -mgeneral-regs-only comes before -mcrypto, do we want to set "-fp-armv8" "-neon" or not? In other words, if -mcrypto comes after -mgeneral-regs-only, does it only override '+crypto' or override all the three features? I'll change the logic and add tests after making sure what we really want to do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60472





More information about the cfe-commits mailing list