歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> Linux資訊 >> Linux文化

GCC擴展匯編代碼編譯出錯!不知道原因!?


__asm__ __volatile__ ( "cld\n\t" "rep\n\t" "stosd "

:

:"a"(0),"c"(128),"D"(remain)

:"%eax","%ecx","%edi" ); //function number 出錯消息為: recovery.cpp:21: 錯誤:can't find a register in class ‘CREG’ while reloading ‘asm’

>>> 此貼的回復 >> 試一下把ecx換成edx看看能否編譯通過。

>>> 此貼的回復 >> 將 :"%eax","%ecx","%edi" ); //function number改為 :"eax","ecx","edi" ); //function number或者 :%eax,%ecx,%edi ); //function number


Copyright © Linux教程網 All Rights Reserved