以下 GCC 内联汇编取自 LuaJit 的 coco 库。有人可以逐行解释它的作用吗?
static inline void coco_switch(coco_ctx from, coco_ctx to)
{
__asm__ __volatile__ (
"movl $1f, (%0)\n\t"
"movl %%esp, 4(%0)\n\t"
"movl %%ebp, 8(%0)\n\t"
"movl 8(%1), %%ebp\n\t"
"movl 4(%1), %%esp\n\t"
"jmp *(%1)\n" "1:\n"
: "+S" (from), "+D" (to) : : "eax", "ebx", "ecx", "edx", "memory", "cc");
}
谢谢