[PATCH] D122377: [PowerPC][Linux] Support 16-byte lock free atomics on pwr8 and up

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 19:13:21 PDT 2022


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/Basic/Targets/PPC.h:448
+  void setMaxAtomicWidth() override {
+    // For layout on ELF targets, we support up to 16 bytes.
+    if (getTriple().isOSBinFormatELF())
----------------
I believe this should be presented more as this override being implemented currently only for ELF targets. The current presentation seems to imply more design intent for non-ELF targets than there is consensus for.

For example:
```
if (!getTriple().isOSBinFormatELF())
  return PPCTargetInfo::setMaxAtomicWidth();
```


================
Comment at: clang/test/Sema/atomic-ops.c:13
+// RUN:   -target-cpu pwr8 -DPPC64_PWR8
 
 // Basic parsing/Sema tests for __c11_atomic_*
----------------
This will need a separate patch to cover ppc32 (likely with AIX).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122377



More information about the cfe-commits mailing list