Skip to content

Commit 8d988c7

Browse files
committed
Allow sparcv8plus to use "cas".
Theo Schlossnagle
1 parent d8f940f commit 8d988c7

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/backend/port/tas/solaris_sparc.s

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@
1616
.global pg_atomic_cas
1717
pg_atomic_cas:
1818

19-
! "cas" only works on sparcv9 chips, and requies a compiler
20-
! that is targeting sparcv9. It will fail on a compiler
21-
! targeting sparcv8, and of course will not be understood
22-
! by a sparcv8 CPU. gcc continues to use "ldstub" because
23-
! there is no indication which sparc version it is targeting.
19+
! "cas" only works on sparcv9 and sparcv8plus chips, and
20+
! requies a compiler targeting these CPUs. It will fail
21+
! on a compiler targeting sparcv8, and of course will not
22+
! be understood by a sparcv8 CPU. gcc continues to use
23+
! "ldstub" because it targets sparcv7.
2424
!
25-
! It is actually possible to use "cas" for sparcv8 binaries if
26-
! -xarch=v8plus is used for compilation. There is actually a
27-
! trick for embedding "cas" in a sparcv8-targeted compiler, but
28-
! it can only be run on a sparcv8plus cpus:
25+
! There is actually a trick for embedding "cas" in a
26+
! sparcv8-targeted compiler, but it can only be run
27+
! on a sparcv8plus/v9 cpus:
2928
!
3029
! http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/sparc/threads/sparc.il
3130
!
3231

33-
#ifdef __sparcv9
32+
#if defined(__sparcv9) || defined(__sparcv8plus)
3433
cas [%o0],%o2,%o1
3534
#else
3635
ldstub [%o0],%o1

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