什么是“__asm”和“__asm__”之间的区别? [英] What is the difference between '__asm' and '__asm__'?
本文介绍了什么是“__asm”和“__asm__”之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我学习C语言内联汇编据我所知,__ ASM {...}之间的的唯一区别;
和 __ asm__ (...);
是第一个使用 MOV EAX,VAR
第二个使用 MOVL%0 ,EAX %%
与:= R(VAR)在结束
。另外,还有一些关于第一少很多网站。还有什么其他区别有哪些?
I am learning inline assembly in C. As far as I can tell, the only difference between __asm { ... };
and __asm__("...");
is that the first uses mov eax, var
and the second uses movl %0, %%eax
with :"=r" (var)
at the end. Also, there are a lot less websites about the first. What other differences are there?
推荐答案
使用哪种方法取决于你的编译器。这不是标准类似于C语言。
Which one you use depends on your compiler. This isn't standard like the C language.
这篇关于什么是“__asm”和“__asm__”之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文