求一段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
上面这段代码完全看不懂啥意思 info gcc->C Extensions->Extended Asm
info as->Pseudo Ops
也可以看看
http://blog.chinaunix.net/u/17660/showart_259729.html info gcc->C Extensions->Extended Asm
info as->Pseudo Ops
也可以看看
http://blog.chinaunix.net/u/17660/showart_259729.html
页:
[1]