RDRAND和RDSEED内在函数GCC和Intel C ++ [英] RDRAND and RDSEED intrinsics GCC and Intel C++

查看:1187
本文介绍了RDRAND和RDSEED内在函数GCC和Intel C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

英特尔C ++编译器和/或GCC是否支持以下内在函数,如自2012/2013年以来的MSVC?

Does Intel C++ compiler and/or GCC support the following intrinsics, like MSVC does since 2012 / 2013?

int _rdrand16_step(uint16_t*);
int _rdrand32_step(uint32_t*);
int _rdrand64_step(uint64_t*);
int _rdseed16_step(uint16_t*);
int _rdseed32_step(uint32_t*);
int _rdseed64_step(uint64_t*);

如果支持这些内在函数,因为它们支持哪些版本(使用编译时常数)?

And if these intrinsics are supported, since which version are they supported (with compile-time-constant please)?

推荐答案

GCC和英特尔编译器都支持它们。 GCC支持在2010年年底引入。它们需要标题< immintrin.h>

Both GCC and Intel compiler support them. GCC support was introduced at the end of 2010. They require the header <immintrin.h>.

GCC支持至少已经存在4.6版本,但似乎没有任何特定的编译时常数 - 你可以检查 __ GNUC_MAJOR__> 4 || (__GNUC_MAJOR__ == 4&& __GNUC_MINOR__> = 6)

GCC support has been present since at least version 4.6, but there doesn't seem to be any specific compile-time constant - you can just check __GNUC_MAJOR__ > 4 || (__GNUC_MAJOR__ == 4 && __GNUC_MINOR__ >= 6).

这篇关于RDRAND和RDSEED内在函数GCC和Intel C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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