Skip to content

Commit 2d03390

Browse files
committed
Sigh, looks like you need '.set mips2' before you can access MIPS
SYNC instruction.
1 parent 46a0eee commit 2d03390

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/include/storage/s_lock.h

Lines changed: 9 additions & 3 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.139 2005/08/28 18:26:01 tgl Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.140 2005/08/29 00:41:34 tgl Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -490,8 +490,14 @@ tas(volatile slock_t *lock)
490490
/* MIPS S_UNLOCK is almost standard but requires a "sync" instruction */
491491
#define S_UNLOCK(lock) \
492492
do \
493-
{\
494-
__asm__ __volatile__ (" sync \n"); \
493+
{ \
494+
__asm__ __volatile__( \
495+
" .set push \n" \
496+
" .set mips2 \n" \
497+
" .set noreorder \n" \
498+
" .set nomacro \n" \
499+
" sync \n" \
500+
" .set pop "); \
495501
*((volatile slock_t *) (lock)) = 0; \
496502
} while (0)
497503

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy