[clang] [z/OS][Clang] Add compare and swap builtin functions (PR #202362)
Sean Perry via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 09:29:21 PDT 2026
================
@@ -5859,6 +5859,43 @@ to main memory and flushes the copy from the data cache.
int a = 1;
__builtin_dcbf (&a);
+z/OS Language Extensions
+------------------------
+
+z/OS builtins
+^^^^^^^^^^^^^
+
+z/OS supports builtins for compare-and-swap operations that generate the
+corresponding z/OS assembly instructions (CS, CSG, CDSG). These builtins
+compare the value pointed to by oldptr to the value pointed to by curptr.
+If they are equal, the newword value is copied into the location pointed to by
----------------
perry-ca wrote:
You should change `newword value` to be `value pointed to by newword` and also say for __cs newword is an value and not a pointer to a value.
https://github.com/llvm/llvm-project/pull/202362
More information about the cfe-commits
mailing list