|
81 | 81 | * * pg_atomic_compare_exchange_u32(), pg_atomic_fetch_add_u32()
|
82 | 82 | * using compiler intrinsics are a good idea.
|
83 | 83 | */
|
| 84 | +/* |
| 85 | + * Given a gcc-compatible xlc compiler, prefer the xlc implementation. The |
| 86 | + * ppc64le "IBM XL C/C++ for Linux, V13.1.2" implements both interfaces, but |
| 87 | + * __sync_lock_test_and_set() of one-byte types elicits SIGSEGV. |
| 88 | + */ |
| 89 | +#if defined(__IBMC__)|| defined(__IBMCPP__) |
| 90 | +#include"port/atomics/generic-xlc.h" |
84 | 91 | /* gcc or compatible, including clang and icc */
|
85 |
| -#if defined(__GNUC__)|| defined(__INTEL_COMPILER) |
| 92 | +#elif defined(__GNUC__)|| defined(__INTEL_COMPILER) |
86 | 93 | #include"port/atomics/generic-gcc.h"
|
87 | 94 | #elif defined(WIN32_ONLY_COMPILER)
|
88 | 95 | #include"port/atomics/generic-msvc.h"
|
89 | 96 | #elif defined(__hpux)&& defined(__ia64)&& !defined(__GNUC__)
|
90 | 97 | #include"port/atomics/generic-acc.h"
|
91 | 98 | #elif defined(__SUNPRO_C)&& !defined(__GNUC__)
|
92 | 99 | #include"port/atomics/generic-sunpro.h"
|
93 |
| -#elif (defined(__IBMC__)|| defined(__IBMCPP__))&& !defined(__GNUC__) |
94 |
| -#include"port/atomics/generic-xlc.h" |
95 | 100 | #else
|
96 | 101 | /*
|
97 | 102 | * Unsupported compiler, we'll likely use slower fallbacks... At least
|
|