您可以为旧 CPU 设置 Visual Studio 2017 CPU 目标吗? [英] Can you set Visual Studio 2017 CPU target for old CPU?

查看:23
本文介绍了您可以为旧 CPU 设置 Visual Studio 2017 CPU 目标吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法设置 Visual Studio 2017 以支持旧 CPU?说一个没有 SSE2 的?

Is there a way to setup Visual Studio 2017 to support older CPU? Say one that doesn't have SSE2?

谢谢.

推荐答案

您可以在项目的设置中选择要使用(或不使用任何)的 CPU 扩展.以下在 VS2019 中有效,但是,IIRC,对于 VS2017,它非常.

You can select what CPU extensions to use (or not to use any) in the project's settings. The following works in VS2019 but, IIRC, it's very similar for VS2017.

在解决方案资源管理器中,右键单击项目并从弹出菜单中选择属性".打开 C/C++ 树列表并选择 Code Generation 页面.然后,在启用增强指令集"中选择无增强指令"选项(或未设置",如果不可用),如下所示:

In the solution explorer, right-click on the project and select "Properties" from the pop-up menu. Open the C/C++ tree list and select the Code Generation page. Then, in the "Enable Enhanced Instruction Set" select the "No Enhanced Instructions" option (or "Not Set," if that isn't available), as below:

无增强指令"选项将指示编译器仅使用基本"Intel-x86 指令集(应该适用于 Pentium CPU).

The "No Enhanced Instructions" option will instruct the compiler to use only the 'basic' Intel-x86 instruction set (which should work for a Pentium CPU).

等效的命令行选项是 /arch:IA32,根据 M/S 文档:

The equivalent command-line option is /arch:IA32, which, as per M/S Documentation:

未指定增强指令并指定 x87浮点计算.

Specifies no enhanced instructions and also specifies x87 for floating-point calculations.

在旧版本的 MSVC 中,有一个选项可以包含针对Pentium 的代码防护FDIV Bug," (/QIfdiv) 但现在似乎已被删除.

In older versions of MSVC, there was an option to include code guards against the "Pentium FDIV Bug," (/QIfdiv) but it appears that has now been removed.

这篇关于您可以为旧 CPU 设置 Visual Studio 2017 CPU 目标吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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