linux 中内嵌汇编出现此错误
error: ‘asm’ operand has impossible constraints
是由于格式不规范引起,在输入输出中引用的寄存器,在修改的寄存器列表里就不能再出现
register int res;
asm ("addl %%eax,%%edx;\n\t" \
"movl %%edx,%%eax" \
:"=a"(res) \
:"b"(a),"d"(b) \
:); #不能再有eax,ebx,edx