mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-17 04:48:49 +02:00
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
This commit is contained in:
parent
ff9a61eed9
commit
2330f7e65e
@ -208,7 +208,7 @@ g_bit_lock (volatile gint *address,
|
|||||||
{
|
{
|
||||||
#ifdef USE_ASM_GOTO
|
#ifdef USE_ASM_GOTO
|
||||||
retry:
|
retry:
|
||||||
asm volatile goto ("lock bts %1, (%0)\n"
|
__asm__ volatile goto ("lock bts %1, (%0)\n"
|
||||||
"jc %l[contended]"
|
"jc %l[contended]"
|
||||||
: /* no output */
|
: /* no output */
|
||||||
: "r" (address), "r" (lock_bit)
|
: "r" (address), "r" (lock_bit)
|
||||||
@ -281,7 +281,7 @@ g_bit_trylock (volatile gint *address,
|
|||||||
#ifdef USE_ASM_GOTO
|
#ifdef USE_ASM_GOTO
|
||||||
gboolean result;
|
gboolean result;
|
||||||
|
|
||||||
asm volatile ("lock bts %2, (%1)\n"
|
__asm__ volatile ("lock bts %2, (%1)\n"
|
||||||
"setnc %%al\n"
|
"setnc %%al\n"
|
||||||
"movzx %%al, %0"
|
"movzx %%al, %0"
|
||||||
: "=r" (result)
|
: "=r" (result)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user