[glib] Use __asm__ instead of asm
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Use __asm__ instead of asm
- Date: Mon, 20 Jan 2014 13:44:10 +0000 (UTC)
commit 2330f7e65ee22e42016d28c26f554fcfe9518ed5
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 20 08:43:02 2014 -0500
Use __asm__ instead of asm
This is a little more robust as various compiler flags make
gcc forget about asm.
https://bugzilla.gnome.org/show_bug.cgi?id=693299
glib/gbitlock.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/glib/gbitlock.c b/glib/gbitlock.c
index e183d39..12075c9 100644
--- a/glib/gbitlock.c
+++ b/glib/gbitlock.c
@@ -208,12 +208,12 @@ g_bit_lock (volatile gint *address,
{
#ifdef USE_ASM_GOTO
retry:
- asm volatile goto ("lock bts %1, (%0)\n"
- "jc %l[contended]"
- : /* no output */
- : "r" (address), "r" (lock_bit)
- : "cc", "memory"
- : contended);
+ __asm__ volatile goto ("lock bts %1, (%0)\n"
+ "jc %l[contended]"
+ : /* no output */
+ : "r" (address), "r" (lock_bit)
+ : "cc", "memory"
+ : contended);
return;
contended:
@@ -281,12 +281,12 @@ g_bit_trylock (volatile gint *address,
#ifdef USE_ASM_GOTO
gboolean result;
- asm volatile ("lock bts %2, (%1)\n"
- "setnc %%al\n"
- "movzx %%al, %0"
- : "=r" (result)
- : "r" (address), "r" (lock_bit)
- : "cc", "memory");
+ __asm__ volatile ("lock bts %2, (%1)\n"
+ "setnc %%al\n"
+ "movzx %%al, %0"
+ : "=r" (result)
+ : "r" (address), "r" (lock_bit)
+ : "cc", "memory");
return result;
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]