mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1110570: AVX instructions should be emitted only if XSAVE is enabled by the OS; r=sunfish
If the XSAVE functionality is disabled by the OS (which can happen in virtualized environments, for instance), AVX instructions shouldn't be emitted by the JITs. See also the assembly rountines for both x86 and x64 at https://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled/ --HG-- extra : rebase_source : 9008ada71bfc33283578197e0257b30533c650b2 extra : amend_source : 5a796ac9d53b9104a19a7c2354c6201e3c77028d
This commit is contained in:
parent
475547d1ef
commit
2735c5b8fc
@ -200,5 +200,6 @@ CPUInfo::SetSSEVersion()
|
||||
maxSSEVersion = Min(maxSSEVersion, maxEnabledSSEVersion);
|
||||
|
||||
static const int AVXBit = 1 << 28;
|
||||
avxPresent = (flagsECX & AVXBit) && avxEnabled;
|
||||
static const int XSAVEBit = 1 << 27;
|
||||
avxPresent = (flagsECX & AVXBit) && (flagsECX & XSAVEBit) && avxEnabled;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user