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

Commit08690d0

Browse files
committed
Allow NetBSD, m64k to compile the ASM spinlock code.
R?mi Zara
1 parentafc4ffe commit08690d0

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

‎src/backend/storage/lmgr/s_lock.c

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.32 2004/08/30 23:47:20 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.33 2004/12/18 22:12:52 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -136,12 +136,26 @@ s_lock(volatile slock_t *lock, const char *file, int line)
136136

137137

138138
#if defined(__m68k__)
139+
/* really means: extern int tas(slock_t* **lock); */
139140
staticvoid
140-
tas_dummy()/* really means: extern int tas(slock_t
141-
* **lock); */
141+
tas_dummy()
142142
{
143143
__asm____volatile__(
144-
"\
144+
#if defined(__NetBSD__)&& defined(__ELF__)
145+
/* no underscore for label and % for registers */
146+
"\
147+
.globaltas \n\
148+
tas:\n\
149+
movel%sp@(0x4),%a0\n\
150+
tas %a0@\n\
151+
beq _success\n\
152+
moveq#-128,%d0\n\
153+
rts \n\
154+
_success:\n\
155+
moveq#0,%d0\n\
156+
rts \n"
157+
#else
158+
"\
145159
.global_tas\n\
146160
_tas:\n\
147161
movelsp@(0x4),a0\n\
@@ -151,8 +165,9 @@ _tas:\n\
151165
rts\n\
152166
_success:\n\
153167
moveq #0,d0\n\
154-
rts\n\
155-
");
168+
rts\n"
169+
#endif/* __NetBSD__ && __ELF__ */
170+
);
156171
}
157172
#endif/* __m68k__ */
158173

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp