多维数据集错误:_mm_aeskeygenassist_si128内部函数至少需要-xarch = aes [英] ube error: _mm_aeskeygenassist_si128 intrinsic requires at least -xarch=aes

查看:174
本文介绍了多维数据集错误:_mm_aeskeygenassist_si128内部函数至少需要-xarch = aes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在SunOS 5.11(Solaris 11.3)上的Sun Studio 12.3下工作.它提供了我不太了解的编译错误:

I'm working under Sun Studio 12.3 on SunOS 5.11 (Solaris 11.3). Its providing a compile error that I don't quite understand:

$ /opt/solarisstudio12.3/bin/CC -xarch=sse2 -xarch=aes -xarch=sse4_2 -c test.cxx 
"test.cxx", line 11: ube: error: _mm_aeskeygenassist_si128 intrinsic requires at least -xarch=aes.
CC: ube failed for test.cxx

添加-m64会产生相同的错误.

Adding -m64 produces the same error.

测试程序没有太多内容.它仅行使SSE2内部和AES内部:

There's not much to the test program. It simply exercises a SSE2 intrinsic, and an AES intrinsic:

$ cat test.cxx
#include <stdint.h>
#include <wmmintrin.h>
#include <emmintrin.h>
int main(int argc, char* argv[])
{
  // SSE2
  int64_t x[2];
  __m128i y = _mm_loadu_si128((__m128i*)x);

  // AES
  __m128i z = _mm_aeskeygenassist_si128(y,0);

  return 0;
}

我一直在尝试阅读本手册,并学习如何指定多个cpu架构功能,例如SSE2,SSSE3,AES和SSE4.但是我似乎无法确定如何指定多个.这是我找到的更完整的页面之一:Oracle 人页面CC.1 ,但是显然-xarch缺少一些内容.

I've been trying to work through the manual and learn how to specify multiple cpu architecture features, like SSE2, SSSE3, AES and SSE4. But I can't seem to determine how to specify multiple ones. Here's one of the more complete pages I have found: Oracle Man Page CC.1, but I'm obviously missing something with respect to -xarch.

我在做什么错,如何解决?

What am I doing wrong, and how do I fix it?

推荐答案

此命令行

$ /opt/solarisstudio12.3/bin/CC -xarch=sse2 -xarch=aes -xarch=sse4_2 -c test.cxx 

将使用-xarch=sse2 -xarch=aes -xarch=sse4_2的最后一个,并使编译器发出与sse4_2兼容的二进制文件.

will use the last of -xarch=sse2 -xarch=aes -xarch=sse4_2 and cause the compiler to emit sse4_2-compatible binaries.

《 C ++用户指南》第3章:

3.2一般准则

有关C ++编译器选项的一些一般准则如下:

3.2 General Guidelines

Some general guidelines for the C++ compiler options are:

  • -llib选项与库liblib.a(或liblib.so)链接.在源文件和目标文件之后放-llib总是更安全,以确保 搜索图书馆的顺序.

  • The-llib option links with library liblib.a (or liblib.so). It is always safer to put-llib after the source and object files to ensure the order in which libraries are searched.

通常,对编译器选项的处理是从左到右的(除了-U选项是在all-D之后处理的) 选项),允许选择性覆盖宏选项( 包括其他选项).此规则不适用于链接器选项.

In general, processing of the compiler options is from left to right (with the exception that-U options are processed after all-D options), allowing selective overriding of macro options (options that include other options). This rule does not apply to linker options.

-features,-I -l,-L,-library,-pti,-R,-staticlib,-U,-verbose和-xprefetch选项会累积,它们不会被覆盖.

The -features, -I -l, -L, -library, -pti, -R, -staticlib, -U, -verbose, and -xprefetch options accumulate, they do not override.

-D选项会累积.但是,相同名称的多个-D选项会相互覆盖.

The -D option accumulates. However, multiple -D options for the same name override each other.

在源文件,目标文件和库中进行编译和链接 它们在命令行中出现的顺序.

Source files, object files, and libraries are compiled and linked in the order in which they appear on the command line.

完成此操作后,您可以执行诸如覆盖

This is done so you can do things like override the expansion of arguments like -fast, which expands to about 10 separate arguments.

您应该使用-xarch=aes标志-最后或作为唯一的-xarch=...选项.

You should use the -xarch=aes flag - either last or as the only -xarch=... option.

这篇关于多维数据集错误:_mm_aeskeygenassist_si128内部函数至少需要-xarch = aes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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