[glib: 1/2] gbitlock.c: replace remaining 'asm' with '__asm__'
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gbitlock.c: replace remaining 'asm' with '__asm__'
- Date: Tue, 9 Mar 2021 12:44:30 +0000 (UTC)
commit d18bdef42dfc785019127449ac3de125196c77ed
Author: Aleksandr Mezin <mezin alexander gmail com>
Date: Thu Mar 4 04:39:27 2021 +0600
gbitlock.c: replace remaining 'asm' with '__asm__'
Commit 2330f7e65ee22e42016d28c26f554fcfe9518ed5 changed 'asm' to '__asm__' in
g_bit_lock and g_bit_trylock.
Replace 'asm' with '__asm__' in the remaining functions.
Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/2344
glib/gbitlock.c | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/glib/gbitlock.c b/glib/gbitlock.c
index c08a6f934..45fb50999 100644
--- a/glib/gbitlock.c
+++ b/glib/gbitlock.c
@@ -322,10 +322,10 @@ g_bit_unlock (volatile gint *address,
gint lock_bit)
{
#ifdef USE_ASM_GOTO
- asm volatile ("lock btr %1, (%0)"
- : /* no output */
- : "r" (address), "r" (lock_bit)
- : "cc", "memory");
+ __asm__ volatile ("lock btr %1, (%0)"
+ : /* no output */
+ : "r" (address), "r" (lock_bit)
+ : "cc", "memory");
#else
guint mask = 1u << lock_bit;
@@ -405,12 +405,12 @@ void
{
#ifdef USE_ASM_GOTO
retry:
- asm volatile goto ("lock bts %1, (%0)\n"
- "jc %l[contended]"
- : /* no output */
- : "r" (address), "r" ((gsize) lock_bit)
- : "cc", "memory"
- : contended);
+ __asm__ volatile goto ("lock bts %1, (%0)\n"
+ "jc %l[contended]"
+ : /* no output */
+ : "r" (address), "r" ((gsize) lock_bit)
+ : "cc", "memory"
+ : contended);
return;
contended:
@@ -477,12 +477,12 @@ gboolean
#ifdef USE_ASM_GOTO
gboolean result;
- asm volatile ("lock bts %2, (%1)\n"
- "setnc %%al\n"
- "movzx %%al, %0"
- : "=r" (result)
- : "r" (address), "r" ((gsize) lock_bit)
- : "cc", "memory");
+ __asm__ volatile ("lock bts %2, (%1)\n"
+ "setnc %%al\n"
+ "movzx %%al, %0"
+ : "=r" (result)
+ : "r" (address), "r" ((gsize) lock_bit)
+ : "cc", "memory");
return result;
#else
@@ -520,10 +520,10 @@ void
{
#ifdef USE_ASM_GOTO
- asm volatile ("lock btr %1, (%0)"
- : /* no output */
- : "r" (address), "r" ((gsize) lock_bit)
- : "cc", "memory");
+ __asm__ volatile ("lock btr %1, (%0)"
+ : /* no output */
+ : "r" (address), "r" ((gsize) lock_bit)
+ : "cc", "memory");
#else
volatile gsize *pointer_address = address;
gsize mask = 1u << lock_bit;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]