将汇编代码从 32 位迁移到 64 位问题
我负责我继承的一些应用程序级代码,其中有一些基于 32 位指令和寻址的 x86...Intel 汇编代码。我将假设当我们迁移 64 位 Windows 操作系统时,该 32 位汇编代码将运行。是的?
I'm responsible for some application level code that I inherited that has some x86... Intel assembly code based on 32 bit instructions and addressing. I going to make the assumption this 32 bit assembly code will run when we migrate a 64 bit windows OS. Yes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
它可能会运行,但它不会利用 x86 asm 的 64 位扩展提供的任何功能(x86-64,这是所有“64 位”版本的 Windows)或能够紧密地与 x64 库的互操作。 WoW64 层非常稳定,99.999% 的 32 位应用程序在当前的“64 位”操作系统上运行良好。
如果您想迁移到真正的 64 位操作系统(我所知道的唯一操作系统是基于 Itanium 的 ia64),那么您就不走运了。
编辑:另外,如果您想启用大地址访问(能够使用 > 4GB 的 RAM),您可以翻转一个 PE 标头标志,将其打开并允许它寻址更大数量的内存。
It will probably run, but it won't take advantage of any of the features the 64-bit extensions to x86 asm provide (x86-64, which is what all "64-bit" versions of Windows are) or be able to tightly interop with x64 libraries. The WoW64 layer is very stable and 99.999% of 32-bit apps run fine on current "64-bit" OSes.
If you want to migrate to a true 64-bit operating system (the only ones I know of are Itanium-based, ia64), you're out of luck.
Edit: Also, if you want to enable large-address access (able to use >4gb of RAM), there's a PE header flag you can flip that will turn that on and allow it to address larger amounts of memory.
它很可能会运行; 64 位 Windows 支持应用程序的 32 位模式,并且通常非常可靠。 (显然,这些事情永远不是 100%,但买者自负。)
More than likely, it will run; 64-bit Windows supports 32-bit mode for applications and it's generally very reliable. (Obviously these things are never 100%, though - caveat emptor.)
是的。 32 位代码将在 64 位计算机上运行,但它们将无法访问超过 4 GiB 的 RAM。
Yes. 32-bit code will run on 64-bit machines, but they won't be able to access more than 4 GiB of RAM.
如果您继续构建 32 位 x86 应用程序,它将运行。但是,如果您必须将代码移植到 64 位 x86,则汇编代码很可能无法开箱即用地运行(甚至可能无法编译)。
根据您的工具链以及它是否是 C/C++ 代码中的内联汇编器,您甚至可能根本无法编译它。
It will run if you continue to build 32-bit x86 applications, yet. However if you have to port the code to 64-bit x86, chances are that the assembly code won't run (and might not even compile) out of the box.
And depending on your tool chain and if it's inline assembler in C/C++ code or not, you might not even be able to compile it at all.