- Assembly code
#define mov_blk(src,dest,numwords)__asm__ __volatile__("cld\n\t""rep\n\t""movsl"::"S"(src),"D"(dest),"C"(numwords):"%ecx","%esi","%edi" )
------解决方案--------------------------------------------------------
就是串拷贝的简单包装,你能看懂movsx指令就妥了。
#define mov_blk(src,dest,numwords)__asm__ __volatile__("cld\n\t""rep\n\t""movsl"::"S"(src),"D"(dest),"C"(numwords):"%ecx","%esi","%edi" )