目前需要提高程式效能,請問如何在ccs ide,使用組合語言,依照docs.pingcode.com/.../1294448所寫,嘗試在程式碼裡使用
int a = 5, b = 3,res;
__asm("\tADD %0, %1\n"
: "=r"(res)
:"0"(a),"r"(b));
但編譯時會出現錯誤 expected a ")" ,請問是哪裡出了問題?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
目前需要提高程式效能,請問如何在ccs ide,使用組合語言,依照docs.pingcode.com/.../1294448所寫,嘗試在程式碼裡使用
int a = 5, b = 3,res;
__asm("\tADD %0, %1\n"
: "=r"(res)
:"0"(a),"r"(b));
但編譯時會出現錯誤 expected a ")" ,請問是哪裡出了問題?
您好
请参阅 ARM 优化 C/C++编译器 v18.1.0.LTS 用户指南。 请转到关于如何在 C 代码中嵌入__asm 语句的5.9节。
您还可以转到第6.6.2节、了解如何调用在 C 中汇编语言实现的函数