的Windows的支持哪些版本/需要哪个CPU多媒体扩展? [英] Which versions of Windows support/require which CPU multimedia extensions?

查看:391
本文介绍了的Windows的支持哪些版本/需要哪个CPU多媒体扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我已经设法找出:

So far I have managed to find out that:


  • SSE和SSE2是强制性的Windows 8和更高版本(当然任何64位操作系统)

  • AVX只能由Windows 7 SP1或更高版本支持

有没有使用SSE3,SSSE3,SSE4.1有关任何警告,SSE 4.2,AVX2和AVX-512在Windows?

Are there any caveats regarding using SSE3, SSSE3, SSE4.1, SSE 4.2, AVX2 and AVX-512 on Windows?

一些澄清:我需要这个来确定哪些操作系统将我的程序运行,如果我使用来自SSE / AVX集中的一个说明

Some clarification: I need this to determine what OSs will my program run on if I use instructions from one of the SSE/AVX sets.

推荐答案

这是引入新的结构状态扩展需要特殊的操作系统支持,因为操作系统必须保存/恢复恢复上下文切换更多的数据。因此,从操作系统的角度来看,没有什么多余的,它需要做的,让用户空间code运行SSSE3指令是,如果操作系统支持SSE。

Extensions that introduce new architectural state require special OS support, because the OS has to save/restore restore more data on context switches. So from the OSes perspective, there's nothing extra it needs to do to let user-space code run SSSE3 instructions, if the OS supports SSE.

SSE,AVX和AVX512是引入了新的结构状态的扩展。

SSE, AVX, and AVX512 are the extensions that introduced new architectural state.


  • 上证所推出的XMM暂存器

  • AVX推出青运(下其中一半都是老XMM暂存器)。

  • AVX512介绍ZMM(延长YMM暂存器),也翻了64位模式矢量REG数目:zmm0-zmm31

您检查CPU的支持通常的方式,用CPUID指令。然而,你还需要检查操作系统支持(显然与 GetEnabledXStateFeatures 在Windows上),检查OS知道如何保存/恢复向量寄存器状态。

You check for CPU support the usual way, with the CPUID instruction. However, you also need to check for OS support (apparently with GetEnabledXStateFeatures on Windows) to check that the OS knows how to save/restore the vector register state.

运行SSE指令无操作系统支持SSE将故障(含非法指令除外)。因此,操作系统设置位控制寄存器,以便利用向量指令可言,<一个href=\"http://stackoverflow.com/questions/31563078/how-do-i-enable-sse-for-my-freestanding-bootable-$c$c\">otherwise运行它们code将故障。但目前还没有单独的位的操作系统,以表明它支持后矢量扩展,只有SSE(所有相关的操作系统的支持,除了这个问题问的是自制OS)。

Running SSE instructions without OS SSE support will fault (with an illegal-instruction exception). The OS has to set a bit in a control register to enable use of vector instructions at all, otherwise code running them will fault. But there aren't separate bits for the OS to indicate that it supports later vector extensions, only SSE (which all relevant OSes support, except for the homebrew OS that question was asking about).

不幸的是英特尔并没有提供一个独立于操作系统的方法操作系统设置了一下,在CPUID为用户自code显示以检查操作系统的支持。

Unfortunately Intel hasn't provided an OS-independent way an OS to set a bit that shows up in CPUID for user-code to check for OS support.

看来只有知道SSE操作系统上运行的AVX指令不会立即故障。相反,你如果有另一个AVX-使用过程中运行时,你的进程安排到不同的核心您的注册状态损坏,或。

It appears that running AVX instructions on an OS that only knows about SSE won't fault immediately. Instead, you'll have your register state corrupted when your process is scheduled to a different core, or if another AVX-using process runs.

presumably同样会如此AVX512:你应该检查CPUID功能位,的的对操作系统的支持。

Presumably the same will be true for AVX512: you should check the CPUID feature bit, and for OS support.

Windows是不是特就这个云:每个操作系统都会有一个特定的操作系统的方式来检查了一代矢量扩展的操作系统支持。但它确实意味着你需要特定的OS-code。 :/这个答案的早期版本是乐观地认为,这个问题已经解决了,但显然它比以往(无记载数据损坏,而不是非法指令错误)

Windows isn't "special" as far as this goes: every OS will have an OS-specific way to check for OS support for a generation of vector extensions. But it does mean you need OS-specific code. :/ An earlier version of this answer was optimistic that this problem has been solved, but apparently it's worse than ever (silent data corruption instead of illegal-instruction faults).

这篇关于的Windows的支持哪些版本/需要哪个CPU多媒体扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆