[all-commits] [llvm/llvm-project] 3fd0d2: AArch64AsmParser: Restore Lsym at page-offset support

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Apr 9 23:13:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3fd0d22d74027c00bd2365ea1691dc530bb9709a
      https://github.com/llvm/llvm-project/commit/3fd0d22d74027c00bd2365ea1691dc530bb9709a
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-04-09 (Wed, 09 Apr 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCParser/MCAsmParser.h
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/test/MC/AArch64/arm64-diags.s
    M llvm/test/MC/MachO/AArch64/darwin-ARM64-reloc.s

  Log Message:
  -----------
  AArch64AsmParser: Restore Lsym at page-offset support

https://github.com/llvm/llvm-project/pull/134202 removed support for
`sym at page-offset` in instruction operands. This change is generally
reasonable since subtracting an offset from a symbol typically doesn’t
make sense for Mach-O due to its .subsections_via_symbols mechanism, which treats
them as separate atoms.

However, BoringSSL relies on a temporary symbol with a negative offset,
which can be meaningful when the symbol and the referenced location are
within the same atom.
```
../../third_party/boringssl/src/gen/bcm/p256-armv8-asm-apple.S:1160:25: error: unexpected token in argument list
 adrp x23,Lone_mont at PAGE-64
```

It's worth noting that expressions involving @ can be complex and
brittle in MCParser, and much of the Mach-O @ offsets remains
under-tested.

* Allow default argument for parsePrimaryExpr. The argument, used by the niche llvm-ml,
  should not require other targets to adapt.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list