Skip to content

Commit 924b9d6

Browse files
committed
Add simplified sparc8 ASM for solaris_sparc.s, from Alan Stange.
1 parent 407885e commit 924b9d6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/backend/port/tas/solaris_sparc.s

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,19 @@ pg_atomic_cas:
1919
! "cas" only works on sparcv9 chips, and requies a compiler
2020
! that is targeting sparcv9. It will fail on a compiler
2121
! targeting sparcv8, and of course will not be understood
22-
! by a sparcv8 CPU. If this fails on existing Solaris
23-
! systems, we need to use a !defined(__sparcv9) test
24-
! to fall back to the old "ldstub" call for sparcv8 compiles.
25-
! gcc continues to use "ldstub" because there is no indication
26-
! which sparc version it is targeting.
22+
! by a sparcv8 CPU. gcc continues to use "ldstub" because
23+
! there is no indication which sparc version it is targeting.
2724
!
2825
! There actually is a trick for embedding "cas" for a compiler
2926
! that is targeting sparcv8:
3027
!
3128
! http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/sparc/threads/sparc.il
32-
!
33-
! This might work for sparc8:
34-
! ldstub [%o0],%o1 ! moves only a byte
3529

30+
#ifdef __sparcv9
3631
cas [%o0],%o2,%o1
32+
#else
33+
ldstub [%o0],%o1
34+
#endif
3735
mov %o1,%o0
3836
retl
3937
nop

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