[all-commits] [llvm/llvm-project] d4de4c: [AArch64] Support optional constant offset for con...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Feb 2 10:33:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4de4c3eafa9b70c255a4d6d5a14dccff79d10e9
      https://github.com/llvm/llvm-project/commit/d4de4c3eafa9b70c255a4d6d5a14dccff79d10e9
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M clang/test/Sema/inline-asm-validate-aarch64.c
    M llvm/docs/LangRef.rst
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/inlineasm-S-constraint.ll

  Log Message:
  -----------
  [AArch64] Support optional constant offset for constraint "S" (#80255)

Modify the initial implementation (https://reviews.llvm.org/D46745) to
support a constant offset so that the following code will compile:
```
int a[2][2];
void foo() { asm("// %0" :: "S"(&a[1][1])); }
```

We use the generic code path for "s". In GCC's aarch64 port, "S" is
supported for PIC while "s" isn't, making "s" less useful. We implement
"S" but not "s".

Similar to #80201 for RISC-V.




More information about the All-commits mailing list