Skip to content

Commit d41cb63

Browse files
committed
For ppc gcc, implement 64-bit compare_exchange and fetch_add with asm.
While xlc defines __64BIT__, gcc does not. Due to this oversight in commit 30ee5d1, gcc builds continued implementing 64-bit atomics by way of intrinsics. Back-patch to v13, where that commit first appeared. Reviewed by Tom Lane. Discussion: https://postgr.es/m/20201011051043.GA1724101@rfd.leadboat.com
1 parent dc14aa0 commit d41cb63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/port/atomics/arch-ppc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ typedef struct pg_atomic_uint32
3232
} pg_atomic_uint32;
3333

3434
/* 64bit atomics are only supported in 64bit mode */
35-
#ifdef __64BIT__
35+
#if SIZEOF_VOID_P >= 8
3636
#define PG_HAVE_ATOMIC_U64_SUPPORT
3737
typedef struct pg_atomic_uint64
3838
{
3939
volatile uint64 value pg_attribute_aligned(8);
4040
} pg_atomic_uint64;
4141

42-
#endif /* __64BIT__ */
42+
#endif
4343

4444
/*
4545
* This mimics gcc __atomic_compare_exchange_n(..., __ATOMIC_SEQ_CST), but

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy