Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8d988c7

Browse files
committed
Allow sparcv8plus to use "cas".
Theo Schlossnagle
1 parentd8f940f commit8d988c7

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 sparcv9chips,andrequies a compiler
20-
!that istargetingsparcv9. It will fail on a compiler
21-
! targeting sparcv8,and of course willnot be understood
22-
! by a sparcv8 CPU. gcc continues to use"ldstub" because
23-
!there is no indication which sparc versionitis targeting.
19+
!"cas" only works on sparcv9andsparcv8plus chips,and
20+
!requies a compilertargetingthese CPUs. It will fail
21+
!on a compilertargeting sparcv8,and of course willnot
22+
!be understoodby a sparcv8 CPU. gcc continues to use
23+
!"ldstub" becauseittargets 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 sparcv8pluscpus:
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/v9cpus:
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)

[8]ページ先頭

©2009-2025 Movatter.jp