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

Commit5824d02

Browse files
committed
Get the MIPS assembler syntax right. Also add a separate sync command;
the reference I consulted yesterday said SC does a SYNC, but apparentlythis is not true on newer MIPS processors, so be safe.
1 parent338e28e commit5824d02

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/include/storage/s_lock.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
6767
* Portions Copyright (c) 1994, Regents of the University of California
6868
*
69-
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.137 2005/08/2622:04:42 tgl Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.138 2005/08/27 16:22:48 tgl Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -455,6 +455,7 @@ do \
455455

456456
#if defined(__mips__)&& !defined(__sgi)
457457
/* Note: on SGI we use the OS' mutex ABI, see below */
458+
/* Note: R10000 processors require a separate SYNC */
458459
#defineHAS_TEST_AND_SET
459460

460461
typedefunsignedintslock_t;
@@ -474,11 +475,12 @@ tas(volatile slock_t *lock)
474475
" .set noreorder \n"
475476
" .set nomacro \n"
476477
" ll %0, %2 \n"
477-
" or %1, %0,$1 \n"
478+
" or %1, %0,1 \n"
478479
" sc %1, %2 \n"
479-
" xori %1,$1 \n"
480+
" xori %1,1 \n"
480481
" or %0, %0, %1 \n"
481-
"1: .set pop "
482+
" sync \n"
483+
" .set pop "
482484
:"=&r" (_res),"=&r" (_tmp),"+R" (*_l)
483485
:
484486
:"memory");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp