mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01: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,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
|
||||
|
Loading…
Reference in New Issue
Block a user