[PATCH] D104991: [PowerPC] Add XL Compat fetch builtins

Jinsong Ji via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 27 08:40:28 PDT 2021


jsji created this revision.
jsji added reviewers: PowerPC, w2yehia, lkail, shchenz, Whitney.
Herald added subscribers: jfb, kbarton, nemanjai.
jsji requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Prototype
unsigned int __fetch_and_add (volatile unsigned int* addr, unsigned int
val);
unsigned long __fetch_and_addlp (volatile unsigned long* addr, unsigned
long val);

Ref:
https://www.ibm.com/docs/en/xl-c-and-cpp-linux/16.1.1?topic=functions-fetch


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104991

Files:
  clang/include/clang/Basic/BuiltinsPPC.def
  clang/lib/Basic/Targets/PPC.cpp
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/builtins-ppc-xlcompat-fetch-error.c
  clang/test/CodeGen/builtins-ppc-xlcompat-fetch.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104991.354751.patch
Type: text/x-patch
Size: 10207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210627/3b3c5ca6/attachment.bin>


More information about the cfe-commits mailing list