Skip to content

Commit deb4c1a

Browse files
authored
fix: compile on arm missing bracket on cpu_features (#287)
Signed-off-by: kostas <kostas@dragonflydb.io>
1 parent a3f03f1 commit deb4c1a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

base/cpu_features.cc

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
#include <cstdint>
88

9+
// aarch64 is currently a noop.
10+
#ifdef __x86_64__
11+
912
namespace base {
1013

1114
namespace {
1215

13-
// aarch64 is currently a noop.
14-
#ifdef __x86_64__
15-
1616
// See <cpuid.h> for constants reference
17-
constexpr unsigned BIT_AVX2 = (1 << 5);
18-
constexpr unsigned BIT_AVX512F = (1 << 16);
17+
constexpr unsigned BIT_AVX2 = (1 << 5);
18+
constexpr unsigned BIT_AVX512F = (1 << 16);
1919

20-
constexpr unsigned BIT_XSAVE = (1 << 26);
21-
constexpr unsigned BIT_OSXSAVE = (1 << 27);
20+
constexpr unsigned BIT_XSAVE = (1 << 26);
21+
constexpr unsigned BIT_OSXSAVE = (1 << 27);
2222

2323
// A struct to hold the result of a call to cpuid.
2424
typedef struct {
@@ -39,7 +39,7 @@ uint32_t GetXCR0() {
3939
return xcr0;
4040
}
4141

42-
}
42+
} // namespace
4343

4444
CpuFeatures GetCpuFeatures() {
4545
CpuFeatures res;
@@ -68,6 +68,6 @@ CpuFeatures GetCpuFeatures() {
6868
return res;
6969
}
7070

71-
#endif
71+
} // namespace base
7272

73-
} // namespace base
73+
#endif

0 commit comments

Comments
 (0)