Visual C++ (x64) 中的 SSE2 选项 [英] SSE2 option in Visual C++ (x64)

查看:44
本文介绍了Visual C++ (x64) 中的 SSE2 选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 x64 配置添加到我的 C++ 项目以编译我的应用程序的 64 位版本.一切看起来都很好,但编译器给出了以下警告:

I've added x64 configuration to my C++ project to compile 64-bit version of my app. Everything looks fine, but compiler gives the following warning:

`cl : Command line warning D9002 : ignoring unknown option '/arch:SSE2'`

SSE2 优化真的不适用于 64 位项目吗?

Is there SSE2 optimization really not available for 64-bit projects?

推荐答案

似乎所有 64 位处理器都有 SSE2.由于编译器选项在默认情况下始终处于开启状态,因此无需手动开启.

Seems to be all 64-bit processors has SSE2. Since compiler option always switched on by default no need to switch it on manually.

来自维基百科:

SSE 指令:原 AMD64 架构采用 Intel 的 SSE 和 SSE2 作为核心指令.SSE3 指令于 2005 年 4 月添加.SSE2 替换了 x87 指令集的 IEEE 80 位精度,可选择 IEEE 32 位或 64 位浮点数学.这提供了与许多其他现代 CPU 兼容的浮点运算.SSE 和 SSE2 指令也已扩展为对八个新的 XMM 寄存器进行操作.SSE 和 SSE2 在现代 x86 处理器中以 32 位模式提供;但是,如果它们在 32 位程序中使用,则这些程序只能在具有该功能的处理器的系统上运行.这在 64 位程序中不是问题,因为所有 AMD64 处理器都有 SSE 和 SSE2,所以使用 SSE 和 SSE2 指令而不是 x87 指令不会减少可以运行 x64 程序的机器集. SSE 和 SSE2 通常比传统 x87 指令、MMX 和 3DNow! 的速度更快,并且复制了大部分功能.

SSE instructions: The original AMD64 architecture adopted Intel's SSE and SSE2 as core instructions. SSE3 instructions were added in April 2005. SSE2 replaces the x87 instruction set's IEEE 80-bit precision with the choice of either IEEE 32-bit or 64-bit floating-point mathematics. This provides floating-point operations compatible with many other modern CPUs. The SSE and SSE2 instructions have also been extended to operate on the eight new XMM registers. SSE and SSE2 are available in 32-bit mode in modern x86 processors; however, if they're used in 32-bit programs, those programs will only work on systems with processors that have the feature. This is not an issue in 64-bit programs, as all AMD64 processors have SSE and SSE2, so using SSE and SSE2 instructions instead of x87 instructions does not reduce the set of machines on which x64 programs can be run. SSE and SSE2 are generally faster than, and duplicate most of the features of the traditional x87 instructions, MMX, and 3DNow!.

这篇关于Visual C++ (x64) 中的 SSE2 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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