[all-commits] [llvm/llvm-project] f3ef4f: [PowerPC] Add XL compat __compare_and_swap builtins

jsji via All-commits all-commits at lists.llvm.org
Thu Jun 24 18:32:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3ef4f5bff26ac4196a15dad7773a03b9d6df21d
      https://github.com/llvm/llvm-project/commit/f3ef4f5bff26ac4196a15dad7773a03b9d6df21d
  Author: Jinsong Ji <jji at us.ibm.com>
  Date:   2021-06-25 (Fri, 25 Jun 2021)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsPPC.def
    M clang/lib/Basic/Targets/PPC.cpp
    M clang/lib/CodeGen/CGBuiltin.cpp
    A clang/test/CodeGen/builtins-ppc-xlcompat-cas-error.c
    A clang/test/CodeGen/builtins-ppc-xlcompat-cas.c

  Log Message:
  -----------
  [PowerPC] Add XL compat __compare_and_swap builtins

Prototype
int __compare_and_swap (volatile int* addr, int* old_val_addr, int
new_val);

int __compare_and_swaplp (volatile long* addr, long* old_val_addr, long
new_val);

Refer to
https://www.ibm.com/docs/en/xl-c-and-cpp-aix/16.1?topic=functions-compare-swap-compare-swaplp

Reviewed By: w2yehia

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




More information about the All-commits mailing list