[arm64] Implement jscvt feature check for Windows

Change-Id: I7cf964294304c380fb285eebf1e65b0f84dec1a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3384233
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78603}
This commit is contained in:
Seth Brenith 2022-01-12 13:39:59 -08:00 committed by V8 LUCI CQ
parent c73ab4ee23
commit 7b55fc099f

View File

@ -50,6 +50,8 @@
#include "src/base/logging.h"
#include "src/base/platform/wrappers.h"
#if V8_OS_WIN
#include <windows.h>
#include "src/base/win32-headers.h"
#endif
@ -762,6 +764,13 @@ CPU::CPU()
// user-space.
has_non_stop_time_stamp_counter_ = true;
// Defined in winnt.h, but in a newer version of the Windows SDK than the one
// that V8 requires, so we must copy the value here.
constexpr int PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE = 44;
has_jscvt_ =
IsProcessorFeaturePresent(PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE);
#elif V8_OS_LINUX
// Try to extract the list of CPU features from ELF hwcaps.
uint32_t hwcaps = ReadELFHWCaps();