为什么 MSVC 不支持 AMD64 和 Itanium 目标的内联汇编?

发布于 2024-08-02 09:22:41 字数 152 浏览 4 评论 0原文

昨天我了解到,在针对 AMD64 和 Itanium 目标进行编译时,Microsoft Visual C++ 不支持内联汇编(使用 __asm 关键字)。

这是正确的吗?如果是这样,有谁知道为什么他们不支持这些目标的内联汇编?这似乎是一个相当大的功能,只是删除......

Yesterday I learned that inline assembly (with the __asm keyword) is not supported under Microsoft Visual C++ when compiling for AMD64 and Itanium targets.

Is that correct? And if so, does anyone know why they would not support inline assembly for those targets? It seems like a rather big feature to just drop...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

帝王念 2024-08-09 09:22:41

Correct, it still isn't supported in VS 2010 Beta 1. My guess is that inline assembly is just too difficult to implement: the way Microsoft implemented it, it integrates with the surrounding C code so that data can flow in and out of the C code, and appropriate glue code is automatically injected. For that, the C compiler actually needs to understand the assembler code; they just haven't implemented that for AMD64 and Itanium.

像你 2024-08-09 09:22:41

这似乎是一个相当大的功能,只需删除...

只要遵循 C 约定,调用用汇编程序编写的函数非常容易。 本教程解释了如何操作。

It seems like a rather big feature to just drop...

It's quite easy to call a function written with an assembler, as long as you follow C conventions. This tutorial explains how.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文