歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> Linux文化 >> GCC擴展匯編代碼編譯出錯!不知道原因!?

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

日期:2017/2/27 12:12:27   编辑:Linux文化

__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