Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
407885ea
Commit
407885ea
authored
May 17, 2006
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments that Solaris Sun compiler only supports sparc9 ASM,
parent
0d02ef4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
src/backend/port/tas/solaris_sparc.s
src/backend/port/tas/solaris_sparc.s
+17
-0
src/include/storage/s_lock.h
src/include/storage/s_lock.h
+5
-1
No files found.
src/backend/port/tas/solaris_sparc.s
View file @
407885ea
...
@@ -16,6 +16,23 @@
...
@@ -16,6 +16,23 @@
.
global
pg_atomic_cas
.
global
pg_atomic_cas
pg_atomic_cas
:
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
.
!
!
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
cas
[%
o0
],%
o2
,%
o1
cas
[%
o0
],%
o2
,%
o1
mov
%
o1
,%
o0
mov
%
o1
,%
o0
retl
retl
...
...
src/include/storage/s_lock.h
View file @
407885ea
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.15
2 2006/04/29 11:55:19
momjian Exp $
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.15
3 2006/05/17 23:57:03
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -311,6 +311,10 @@ tas(volatile slock_t *lock)
...
@@ -311,6 +311,10 @@ tas(volatile slock_t *lock)
{
{
register
slock_t
_res
;
register
slock_t
_res
;
/*
* See comment in /pg/backend/port/tas/solaris_sparc.s for why this
* uses "ldstub", and that file uses "cas".
*/
__asm__
__volatile__
(
__asm__
__volatile__
(
" ldstub [%2], %0
\n
"
" ldstub [%2], %0
\n
"
:
"=r"
(
_res
),
"+m"
(
*
lock
)
:
"=r"
(
_res
),
"+m"
(
*
lock
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment