[PATCH] D103184: [AArch64] handle -Wa,-march=

David Spickett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 2 02:30:02 PDT 2021


DavidSpickett added a comment.

  $ cat /tmp/test.s
  irg x0, x0
  $ aarch64-unknown-linux-gnu-as -march=armv8.5-a+memtag -march=armv8.1-a /tmp/test.s -o /dev/null
  /tmp/test.s: Assembler messages:
  /tmp/test.s:1: Error: selected processor does not support `irg x0,x0'

GAS is also taking the last value of `march`. So if we were to follow clang Arm's behaviour, the result would be the same.

Except we don't have to rely on the llvm backend picking the last of "target-feature". Which probably works for architecture versions but for individual extensions I don't think so.

If we make it additive this could happen:

  -march=armv8.5-a+memtag -march=armv8.2-a

Becomes: (mte is the backend name for memtag for silly reasons)

  -target-feature +v8.5-a -target-feature mte -target-feature +v8.2-a

So now instead of getting `v8.2` only, the user now has `v8.2+memtag`. Only if they do `armv8.2-a+nomemtag` will they get what they expect (well, what I'd expect). Which means they'd need to know every previous march value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103184



More information about the cfe-commits mailing list