When re开发者_如何学JAVAading the linux 0.01 kernel I pass throw some inline gas which is hard for me to decode:
__asm__("movl $0x3ff000,%%eax\n\t"
"movl %%eax,%%db0\n\t"
"movl $0x000d0303,%%eax\n\t"
"movl %%eax,%%db7"
:::"ax")
or
__asm__("push %%fs;mov %%ax,%%fs;movl %%fs:%2,%%eax;pop %%fs" \
:"=a" (__res):"0" (seg),"m" (*(addr))); \
__res;})
I don't understand how to interpret the stuff in between the ':'.
Does anyone got some documentation about it?
Thanks
http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
6th result on a Google search for "gcc inline assembly".
精彩评论