Chinaunix
标题:
求一段AT&T一段内联汇编问题
[打印本页]
作者:
lileishitou
时间:
2010-11-30 17:55
标题:
求一段AT&T一段内联汇编问题
/* Conditionally execute fence after interlocked instruction. */
static INLINE void
AtomicEpilogue(void)
{
#ifdef ATOMIC_USE_FENCE
#ifdef VMM
/* The monitor conditionally patches out the lfence when not needed.*/
/* Construct a MonitorPatchTextEntry in the .patchtext section. */
asm volatile ("1:\n\t"
"lfence\n\t"
"2:\n\t"
".pushsection .patchtext\n\t"
".quad 1b\n\t"
".quad 2b\n\t"
".popsection\n\t" ::: "memory");
#else
if (UNLIKELY(AtomicUseFence)) {
asm volatile ("lfence" ::: "memory");
}
#endif
#endif
上面这段代码完全看不懂啥意思
作者:
cjaizss
时间:
2010-11-30 21:16
info gcc->C Extensions->Extended Asm
info as->Pseudo Ops
也可以看看
http://blog.chinaunix.net/u/17660/showart_259729.html
作者:
cjaizss
时间:
2010-11-30 21:16
info gcc->C Extensions->Extended Asm
info as->Pseudo Ops
也可以看看
http://blog.chinaunix.net/u/17660/showart_259729.html
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2