aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-05-18 00:05:01 +0000
committerBruce Momjian <bruce@momjian.us>2006-05-18 00:05:01 +0000
commit924b9d62b45ffca8d4f4c243ed81ddf7a17fe612 (patch)
tree62ee3843c71d6fe07a66f35f8053c07bb51d6b89 /src
parent407885ea3b709c34abc4541dacba7b19e5fcf0b4 (diff)
downloadpostgresql-924b9d62b45ffca8d4f4c243ed81ddf7a17fe612.tar.gz
postgresql-924b9d62b45ffca8d4f4c243ed81ddf7a17fe612.zip
Add simplified sparc8 ASM for solaris_sparc.s, from Alan Stange.
Diffstat (limited to 'src')
-rw-r--r--src/backend/port/tas/solaris_sparc.s14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/backend/port/tas/solaris_sparc.s b/src/backend/port/tas/solaris_sparc.s
index 59c44874998..51ba569f8d7 100644
--- a/src/backend/port/tas/solaris_sparc.s
+++ b/src/backend/port/tas/solaris_sparc.s
@@ -19,21 +19,19 @@ pg_atomic_cas:
! "cas" only works on sparcv9 chips, and requies a compiler
! that is targeting sparcv9. It will fail on a compiler
! targeting sparcv8, and of course will not be understood
- ! by a sparcv8 CPU. If this fails on existing Solaris
- ! systems, we need to use a !defined(__sparcv9) test
- ! to fall back to the old "ldstub" call for sparcv8 compiles.
- ! gcc continues to use "ldstub" because there is no indication
- ! which sparc version it is targeting.
+ ! by a sparcv8 CPU. gcc continues to use "ldstub" because
+ ! there is no indication which sparc version it is targeting.
!
! There actually is a trick for embedding "cas" for a compiler
! that is targeting sparcv8:
!
! http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/sparc/threads/sparc.il
- !
- ! This might work for sparc8:
- ! ldstub [%o0],%o1 ! moves only a byte
+#ifdef __sparcv9
cas [%o0],%o2,%o1
+#else
+ ldstub [%o0],%o1
+#endif
mov %o1,%o0
retl
nop