1

我正在使用 Sun Studio 12.2 在 Solaris 11.3 上进行测试。我无法让 SSE shuffle 编译:

solaris:$ cat test.cxx
#include <stdint.h>
#include <emmintrin.h>

int main(int argc, char* argv[])
{
    __m128i a, b;
    asm ("pshufb %1, %0" : "+x"(a) : "xm"(b));
    return 0;
}

接着:

solaris:$ /opt/solstudio12.2/bin/CC test.cxx -o test.exe
"test.cxx", line 7: Error: The operand type "__m128i_" is not allowed for the constraint "+x".
1 Error(s) detected.

pshufb是一个 SSSE3 指令,但我无法确定 Sun Studio 12.2 是否支持它(搜索过程中有太多不相关的噪音)。我相信 Sun Studio 支持它。Sun Studio 12.3 及更高版本使用内联程序集。

为什么我会收到错误,我该如何解决?

4

0 回答 0