[all-commits] [llvm/llvm-project] cfbd5c: [AArch64] Allow .variant_pcs before the symbol is ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Mar 28 17:52:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfbd5c8e4aa1ba3fc11fb408eeedbb05bd235956
      https://github.com/llvm/llvm-project/commit/cfbd5c8e4aa1ba3fc11fb408eeedbb05bd235956
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
    M llvm/test/MC/AArch64/directive-variant_pcs-err.s
    M llvm/test/MC/AArch64/directive-variant_pcs.s

  Log Message:
  -----------
  [AArch64] Allow .variant_pcs before the symbol is registered

glibc sysdeps/aarch64/tst-vpcs-mod.S has something like:
```
.variant_pcs    vpcs_call
.global vpcs_call
```

This is supported by GNU as but leads to an error in MC. Use getOrCreateSymbol
to support a not-yet-registered symbol: call `registerSymbol` to ensure the
symbol exists even if there is no binding directive/label, to match GNU as.

While here, improve tests to check (1) a local symbol can get
STO_AARCH64_VARIANT_PCS (2) undefined .variant_pcs (3) an alias does not
inherit STO_AARCH64_VARIANT_PCS.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D122507




More information about the All-commits mailing list