是否可以在具有32位处理器的计算机上运行64位代码? [英] is it possible to run 64 bit code in a machine with 32 bit processor?

查看:171
本文介绍了是否可以在具有32位处理器的计算机上运行64位代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到处搜寻以获得这些问题的答案。

I have searched around to get the answers for these questions. but not much luck.


  1. 是否可以运行 32位在具有 64位处理器的计算机中编写代码?

  1. Is it possible to run 32-bit code in a machine with 64-bit processor?

答案似乎是肯定的。但是在性能问题上存在争议,因为 32位在处理器上未使用。

The answer seems to be yes. but there is a debate on performance issues, since 32-bits are left unused on the processor.

现在我的问题反之亦然,是否有可能在 32位 64位代码>处理器?

Now my question is vice-versa, Is it possible to run 64-bit code in a machine with 32-bit processor?

据我所知,答案是否定的,因为该代码旨在在 64位
将使用 64进程registars ,但 32位机器仅提供32个进程。

from my little understanding, the answer is NO, because the code designed to run on 64-bit will be using 64-process registars but the 32-bit machine offers only 32.

另一方面,我发现此链接。据此,可以在32位计算机上编译64位代码。但是我不清楚如何做到这一点,再加上在 32位机器上进行编译是否还能保证在上执行

On the otherhand, I found this link. According this, it is possible to compile 64-bit code on a 32-bit machine. But I am not clear on how this is done plus if compiling on a 32-bit machine will also guaranteeexecution on the same.

感谢您的帮助

推荐答案


是否可以在具有64位处理器的计算机上运行32位代码?

Is it possible to run 32-bit code in a machine with 64-bit processor?

是。在Windows中,可以通过 WOW64 处理,例如,

Yes. This is handled in Windows via WOW64, for example.


现在我的问题反之亦然,是否可以在具有32位处理器的计算机上运行64位代码?

Now my question is vice-versa, Is it possible to run 64-bit code in a machine with 32-bit processor?

否。 64位代码将需要64位指令集,而32位处理器将无法使用该指令集。

No. 64bit code would require a 64 bit instruction set, which won't be available on a 32 bit processor.


据此,可能在32位计算机上编译64位代码。

According this, it is possible to compile 64-bit code on a 32-bit machine.

您可以编译用于其他体系结构的代码,但不能执行。这样一来,您可以为当前执行平台以外的其他平台构建代码,但是无法执行。

You can compile code for other architectures, but not execute it. This lets you build code for different platforms than the currently executing platform, but executing it will not work.

这篇关于是否可以在具有32位处理器的计算机上运行64位代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆