aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/cpu_id.cpp
diff options
context:
space:
mode:
authoralbert <albert@yandex-team.ru>2022-02-10 16:48:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:14 +0300
commit9f25ef3232c288ca664ceee6c376cf64e4349a2e (patch)
treeb192eaf3150845f7302fafd460a972b0439d6fe5 /util/system/cpu_id.cpp
parent6a1e535429145ec1ecfbc5f1efd3c95323261fb5 (diff)
downloadydb-9f25ef3232c288ca664ceee6c376cf64e4349a2e.tar.gz
Restoring authorship annotation for <albert@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/cpu_id.cpp')
-rw-r--r--util/system/cpu_id.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/cpu_id.cpp b/util/system/cpu_id.cpp
index 598c71f4d9..0ae06b2868 100644
--- a/util/system/cpu_id.cpp
+++ b/util/system/cpu_id.cpp
@@ -60,8 +60,8 @@ bool NX86::CpuId(ui32 op, ui32* res) noexcept {
return false;
#endif
-}
-
+}
+
namespace {
union TX86CpuInfo {
ui32 Info[4];
@@ -80,11 +80,11 @@ namespace {
inline TX86CpuInfo(ui32 op, ui32 subOp) noexcept {
NX86::CpuId(op, subOp, Info);
}
- };
+ };
static_assert(sizeof(TX86CpuInfo) == 16, "please, fix me");
}
-
+
// https://en.wikipedia.org/wiki/CPUID
bool NX86::HaveRDTSCP() noexcept {
return (TX86CpuInfo(0x80000001).EDX >> 27) & 1u;
@@ -96,8 +96,8 @@ bool NX86::HaveSSE() noexcept {
bool NX86::HaveSSE2() noexcept {
return (TX86CpuInfo(0x1).EDX >> 26) & 1u;
-}
-
+}
+
bool NX86::HaveSSE3() noexcept {
return TX86CpuInfo(0x1).ECX & 1u;
}
@@ -116,8 +116,8 @@ bool NX86::HaveSSE41() noexcept {
bool NX86::HaveSSE42() noexcept {
return (TX86CpuInfo(0x1).ECX >> 20) & 1u;
-}
-
+}
+
bool NX86::HaveF16C() noexcept {
return (TX86CpuInfo(0x1).ECX >> 29) & 1u;
}
@@ -253,7 +253,7 @@ const char* CpuBrand(ui32* store) noexcept {
#endif
return (const char*)store;
-}
+}
#define Y_DEF_NAME(X) \
bool NX86::CachedHave##X() noexcept { \