Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compile on arm missing bracket on cpu_features #287

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions base/cpu_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@

#include <cstdint>

// aarch64 is currently a noop.
#ifdef __x86_64__

namespace base {

namespace {

// aarch64 is currently a noop.
#ifdef __x86_64__

// See <cpuid.h> for constants reference
constexpr unsigned BIT_AVX2 = (1 << 5);
constexpr unsigned BIT_AVX512F = (1 << 16);
constexpr unsigned BIT_AVX2 = (1 << 5);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format did not run on the previous PR 😮 ?

constexpr unsigned BIT_AVX512F = (1 << 16);

constexpr unsigned BIT_XSAVE = (1 << 26);
constexpr unsigned BIT_OSXSAVE = (1 << 27);
constexpr unsigned BIT_XSAVE = (1 << 26);
constexpr unsigned BIT_OSXSAVE = (1 << 27);

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

}
} // namespace

CpuFeatures GetCpuFeatures() {
CpuFeatures res;
Expand Down Expand Up @@ -68,6 +68,6 @@ CpuFeatures GetCpuFeatures() {
return res;
}

#endif
} // namespace base

} // namespace base
#endif