mirror of
https://github.com/matrix-construct/construct
synced 2024-11-10 20:11:07 +01:00
ircd::info: Detect sse4a; guest.
This commit is contained in:
parent
85b550597c
commit
ef778b07bf
2 changed files with 18 additions and 2 deletions
|
@ -98,6 +98,7 @@ namespace ircd::info::hardware
|
||||||
extern const size_t l3, l3_line, l3_tag, l3_assoc;
|
extern const size_t l3, l3_line, l3_tag, l3_assoc;
|
||||||
extern const size_t page_size;
|
extern const size_t page_size;
|
||||||
extern const ulonglong cap[2];
|
extern const ulonglong cap[2];
|
||||||
|
extern const bool virtualized;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ircd::info::hardware::x86
|
namespace ircd::info::hardware::x86
|
||||||
|
@ -117,7 +118,7 @@ namespace ircd::info::hardware::x86
|
||||||
|
|
||||||
extern const string_view vendor;
|
extern const string_view vendor;
|
||||||
extern const bool mmx, sse, sse2;
|
extern const bool mmx, sse, sse2;
|
||||||
extern const bool sse3, ssse3, sse4_1, sse4_2;
|
extern const bool sse3, ssse3, sse4a, sse4_1, sse4_2;
|
||||||
extern const bool avx, avx2;
|
extern const bool avx, avx2;
|
||||||
extern const bool tsc, tsc_constant;
|
extern const bool tsc, tsc_constant;
|
||||||
};
|
};
|
||||||
|
|
17
ircd/info.cc
17
ircd/info.cc
|
@ -145,12 +145,13 @@ ircd::info::dump_cpu_info()
|
||||||
#if defined(__i386__) or defined(__x86_64__)
|
#if defined(__i386__) or defined(__x86_64__)
|
||||||
log::info
|
log::info
|
||||||
{
|
{
|
||||||
log::star, "%s sse:%b sse2:%b sse3:%b ssse3:%b sse4.1:%b sse4.2:%b avx:%b avx2:%b constant_tsc:%b",
|
log::star, "%s sse:%b sse2:%b sse3:%b ssse3:%b sse4a:%b sse4.1:%b sse4.2:%b avx:%b avx2:%b constant_tsc:%b",
|
||||||
hardware::x86::vendor,
|
hardware::x86::vendor,
|
||||||
hardware::x86::sse,
|
hardware::x86::sse,
|
||||||
hardware::x86::sse2,
|
hardware::x86::sse2,
|
||||||
hardware::x86::sse3,
|
hardware::x86::sse3,
|
||||||
hardware::x86::ssse3,
|
hardware::x86::ssse3,
|
||||||
|
hardware::x86::sse4a,
|
||||||
hardware::x86::sse4_1,
|
hardware::x86::sse4_1,
|
||||||
hardware::x86::sse4_2,
|
hardware::x86::sse4_2,
|
||||||
hardware::x86::avx,
|
hardware::x86::avx,
|
||||||
|
@ -407,6 +408,12 @@ ircd::info::hardware::x86::ssse3
|
||||||
bool(features & (uint128_t(1) << (64 + 9)))
|
bool(features & (uint128_t(1) << (64 + 9)))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::info::hardware::x86::sse4a)
|
||||||
|
ircd::info::hardware::x86::sse4a
|
||||||
|
{
|
||||||
|
bool(_features & (uint128_t(1) << (64 + 6)))
|
||||||
|
};
|
||||||
|
|
||||||
decltype(ircd::info::hardware::x86::sse4_1)
|
decltype(ircd::info::hardware::x86::sse4_1)
|
||||||
ircd::info::hardware::x86::sse4_1
|
ircd::info::hardware::x86::sse4_1
|
||||||
{
|
{
|
||||||
|
@ -802,6 +809,14 @@ ircd::info::hardware::cap
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::info::hardware::virtualized)
|
||||||
|
ircd::info::hardware::virtualized
|
||||||
|
{
|
||||||
|
#ifdef __x86_64__
|
||||||
|
bool(x86::features & (uint128_t(1) << (64 + 31)))
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// System information
|
// System information
|
||||||
|
|
Loading…
Reference in a new issue