From ead31fc418554ce3611e14f600bfe5df2ce3d728 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 29 Aug 2005 00:41:44 +0000 Subject: [PATCH] Sigh, looks like you need '.set mips2' before you can access MIPS SYNC instruction. --- src/include/storage/s_lock.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 29e071440b..3416d2ebd8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -490,8 +490,14 @@ tas(volatile slock_t *lock) /* MIPS S_UNLOCK is almost standard but requires a "sync" instruction */ #define S_UNLOCK(lock) \ do \ -{\ - __asm__ __volatile__ (" sync \n"); \ +{ \ + __asm__ __volatile__( \ + " .set push \n" \ + " .set mips2 \n" \ + " .set noreorder \n" \ + " .set nomacro \n" \ + " sync \n" \ + " .set pop "); \ *((volatile slock_t *) (lock)) = 0; \ } while (0) -- 2.39.5