开发者

Migrating assembly code from 32 to 64 bit question

I'm responsible for some application level code that I inherited that has some x86... Intel assembly code based on 32 b开发者_高级运维it 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?


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.


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.)


Yes. 32-bit code will run on 64-bit machines, but they won't be able to access more than 4 GiB of RAM.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜