mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Detect Intel's Multi-Precision Add-Carry Instruction Extensions
See d35e2f38eb
This commit is contained in:
parent
12298ed931
commit
08aea9aa5b
@ -79,6 +79,7 @@ typedef struct
|
||||
|
||||
int dca : 1;
|
||||
int ss : 1;
|
||||
int adx : 1;
|
||||
// Make sure to update X86FeaturesEnum below if you add a field here.
|
||||
} X86Features;
|
||||
|
||||
@ -207,6 +208,7 @@ typedef enum
|
||||
X86_RDRND,
|
||||
X86_DCA,
|
||||
X86_SS,
|
||||
X86_ADX,
|
||||
X86_LAST_,
|
||||
} X86FeaturesEnum;
|
||||
|
||||
|
@ -74,7 +74,8 @@
|
||||
FEATURE(X86_MOVBE, movbe, "movbe", 0, 0) \
|
||||
FEATURE(X86_RDRND, rdrnd, "rdrnd", 0, 0) \
|
||||
FEATURE(X86_DCA, dca, "dca", 0, 0) \
|
||||
FEATURE(X86_SS, ss, "ss", 0, 0)
|
||||
FEATURE(X86_SS, ss, "ss", 0, 0) \
|
||||
FEATURE(X86_ADX, adx, "adx", 0, 0)
|
||||
#define DEFINE_TABLE_FEATURE_TYPE X86Features
|
||||
#define DEFINE_TABLE_DONT_GENERATE_HWCAPS
|
||||
#include "define_tables.h"
|
||||
@ -1347,6 +1348,7 @@ static void ParseCpuId(const uint32_t max_cpuid_leaf,
|
||||
features->sha = IsBitSet(leaf_7.ebx, 29);
|
||||
features->vaes = IsBitSet(leaf_7.ecx, 9);
|
||||
features->vpclmulqdq = IsBitSet(leaf_7.ecx, 10);
|
||||
features->adx = IsBitSet(leaf_7.ebx, 19);
|
||||
|
||||
if (os_support.have_sse_via_os)
|
||||
{
|
||||
|
@ -150,6 +150,7 @@ TEST_F(CpuidX86Test, SandyBridge)
|
||||
EXPECT_TRUE(features.popcnt);
|
||||
EXPECT_FALSE(features.movbe);
|
||||
EXPECT_FALSE(features.rdrnd);
|
||||
EXPECT_FALSE(features.adx);
|
||||
}
|
||||
|
||||
const int KiB = 1024;
|
||||
|
Loading…
Reference in New Issue
Block a user