无法在启用的 cpu 上使用 SSSE3

发布于 2024-12-01 03:17:01 字数 614 浏览 3 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

物价感观 2024-12-08 03:17:01

您是否尝试使用 -msse4.2 进行构建?

  • 支持SSE4.2内置函数和代码生成
    可通过-msse4.2获得。
  • SSE4.1 和 SSE4.2 支持都可以通过 -msse4 启用。

http://gcc.gnu.org/gcc-4.3/changes.html

Did you try building with -msse4.2?

  • Support for SSE4.2 built-in functions and code generation are
    available via -msse4.2.
  • Both SSE4.1 and SSE4.2 support can be enabled via -msse4.

http://gcc.gnu.org/gcc-4.3/changes.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文