0
0
Fork 0
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:
Jason Volk 2020-07-10 23:43:52 -07:00
parent 85b550597c
commit ef778b07bf
2 changed files with 18 additions and 2 deletions

View file

@ -98,6 +98,7 @@ namespace ircd::info::hardware
extern const size_t l3, l3_line, l3_tag, l3_assoc;
extern const size_t page_size;
extern const ulonglong cap[2];
extern const bool virtualized;
}
namespace ircd::info::hardware::x86
@ -117,7 +118,7 @@ namespace ircd::info::hardware::x86
extern const string_view vendor;
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 tsc, tsc_constant;
};

View file

@ -145,12 +145,13 @@ ircd::info::dump_cpu_info()
#if defined(__i386__) or defined(__x86_64__)
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::sse,
hardware::x86::sse2,
hardware::x86::sse3,
hardware::x86::ssse3,
hardware::x86::sse4a,
hardware::x86::sse4_1,
hardware::x86::sse4_2,
hardware::x86::avx,
@ -407,6 +408,12 @@ ircd::info::hardware::x86::ssse3
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)
ircd::info::hardware::x86::sse4_1
{
@ -802,6 +809,14 @@ ircd::info::hardware::cap
#endif
};
decltype(ircd::info::hardware::virtualized)
ircd::info::hardware::virtualized
{
#ifdef __x86_64__
bool(x86::features & (uint128_t(1) << (64 + 31)))
#endif
};
///////////////////////////////////////////////////////////////////////////////
//
// System information