зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1708743 - [wasm] Use IsAvxPresent flag in build ID. r=lth
Differential Revision: https://phabricator.services.mozilla.com/D135560
This commit is contained in:
Родитель
83ead1dbb0
Коммит
7b2c6799e8
|
@ -180,6 +180,7 @@ class CPUInfo {
|
|||
SSE4_1 = 6,
|
||||
SSE4_2 = 7
|
||||
};
|
||||
static const int AVX_PRESENT_BIT = 8;
|
||||
|
||||
static SSEVersion GetSSEVersion() {
|
||||
if (maxSSEVersion == UnknownSSE) {
|
||||
|
@ -201,6 +202,10 @@ class CPUInfo {
|
|||
return avxPresent;
|
||||
}
|
||||
|
||||
static inline uint32_t GetFingerprint() {
|
||||
return GetSSEVersion() | (IsAVXPresent() ? AVX_PRESENT_BIT : 0);
|
||||
}
|
||||
|
||||
private:
|
||||
static SSEVersion maxSSEVersion;
|
||||
static SSEVersion maxEnabledSSEVersion;
|
||||
|
|
|
@ -54,13 +54,13 @@ uint32_t wasm::ObservedCPUFeatures() {
|
|||
};
|
||||
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
MOZ_ASSERT(uint32_t(jit::CPUInfo::GetSSEVersion()) <=
|
||||
MOZ_ASSERT(uint32_t(jit::CPUInfo::GetFingerprint()) <=
|
||||
(UINT32_MAX >> ARCH_BITS));
|
||||
return X86 | (uint32_t(jit::CPUInfo::GetSSEVersion()) << ARCH_BITS);
|
||||
return X86 | (uint32_t(jit::CPUInfo::GetFingerprint()) << ARCH_BITS);
|
||||
#elif defined(JS_CODEGEN_X64)
|
||||
MOZ_ASSERT(uint32_t(jit::CPUInfo::GetSSEVersion()) <=
|
||||
MOZ_ASSERT(uint32_t(jit::CPUInfo::GetFingerprint()) <=
|
||||
(UINT32_MAX >> ARCH_BITS));
|
||||
return X64 | (uint32_t(jit::CPUInfo::GetSSEVersion()) << ARCH_BITS);
|
||||
return X64 | (uint32_t(jit::CPUInfo::GetFingerprint()) << ARCH_BITS);
|
||||
#elif defined(JS_CODEGEN_ARM)
|
||||
MOZ_ASSERT(jit::GetARMFlags() <= (UINT32_MAX >> ARCH_BITS));
|
||||
return ARM | (jit::GetARMFlags() << ARCH_BITS);
|
||||
|
|
Загрузка…
Ссылка в новой задаче