diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-08-31 16:30:12 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-08-31 16:30:12 -0400 |
commit | cf25b2a2f9a4306637a985cee86a9a987c0b6a7c (patch) | |
tree | 3746b953f806968d7943cdefa7fe8edd6590e77c /src/include/port/atomics/generic-gcc.h | |
parent | f333204bbcd32091311b070e8f8ab4717dd8cadf (diff) |
Allow icc to use the same atomics infrastructure as gcc.
The atomics headers were written under the impression that icc doesn't
handle gcc-style asm blocks, but this is demonstrably false on x86_[64],
because s_lock.h has done it that way for more than a decade. (The jury is
still out on whether this also works on ia64, so I'm leaving ia64-related
code alone for the moment.) Treat gcc and icc the same in these headers.
This is less code and it should improve the results for icc, because we
hadn't gotten around to providing icc-specific implementations for most
of the atomics.
Diffstat (limited to 'src/include/port/atomics/generic-gcc.h')
-rw-r--r-- | src/include/port/atomics/generic-gcc.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/include/port/atomics/generic-gcc.h b/src/include/port/atomics/generic-gcc.h index 306c38f6f7f..8a50485cda8 100644 --- a/src/include/port/atomics/generic-gcc.h +++ b/src/include/port/atomics/generic-gcc.h @@ -25,14 +25,9 @@ #endif /* - * icc provides all the same intrinsics but doesn't understand gcc's inline asm + * An empty asm block should be a sufficient compiler barrier. */ -#if defined(__INTEL_COMPILER) -/* NB: Yes, __memory_barrier() is actually just a compiler barrier */ -#define pg_compiler_barrier_impl() __memory_barrier() -#else #define pg_compiler_barrier_impl() __asm__ __volatile__("" ::: "memory") -#endif /* * If we're on GCC 4.1.0 or higher, we should be able to get a memory barrier |