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

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

问题描述

我四处寻找这些问题的答案.但运气不佳.

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

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

  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-bit 上运行将使用 64 位进程注册器,但 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 guarantee execution 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天全站免登陆