无法在启用的 cpu 上使用 SSSE3
我有一个 Xeon W3550 处理器,应该支持 SSE4.2 指令集,但是当我尝试在我的 c 程序中使用 SSE2 之后的任何内容时,我会收到编译器错误,例如,
#error "SSE4.2 instruction set not enabled"
当我使用
$cat /procs/cpuinfo
它时,它会检测到所有相关的 sse 指令集,但
$cpuid
仅检测 SSE 和 SSE2。
我的操作系统是 ubuntu 11.04,内核为 2.6.38-11-generic。
关于如何解决这个问题有什么想法吗?谢谢。
编辑:根据下面 Steve-o 的评论进行更新。头文件<*mmintrin.h>使用 #ifndef 预处理器指令检查它们关联的 sse 版本,例如,
#ifndef __SSSE3__
#error "SSSE3 instruction set not enabled".
所以我想问题是,尽管 cpu 启用了 SSSE3,但为什么会返回 false。
I have a Xeon W3550 processor that is supposed to have support for the SSE4.2 instruction set but when I try and use anything past SSE2 in my c program I get a compiler error e.g.
#error "SSE4.2 instruction set not enabled"
When I use
$cat /procs/cpuinfo
it detects all relevant sse instruction sets but
$cpuid
only detects SSE and SSE2.
My operating system is ubuntu 11.04 with kernel 2.6.38-11-generic.
Any ideas on how to fix this? Thanks.
EDIT: An update based on Steve-o's comment below. The header files <*mmintrin.h> perform a check for the sse version that they are associated with by using #ifndef preprocessor directive e.g.
#ifndef __SSSE3__
#error "SSSE3 instruction set not enabled".
So I guess the question is then why is this coming back false despite the cpu being SSSE3 enabled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试使用
-msse4.2
进行构建?可通过-msse4.2获得。
http://gcc.gnu.org/gcc-4.3/changes.html
Did you try building with
-msse4.2
?available via -msse4.2.
http://gcc.gnu.org/gcc-4.3/changes.html