SSE instructions in DOS programs? (Developers)
> What is the recomended way how to obtain whether I can use the SSE
> instructions?
> First step is clear - use the CPUID.
> But what about test whether the SSE are supported by the OS?
> Sure, I can just include some DPMI server which enables (supports) the SSE
> (cwsdpmi r7) but what about situation when already other DPMI server is
> running? Or somebody uses my program under Win95? (which does not have the
> SSE support)
>
> Internet says that it is enough to test the 9.bit and 10.bit in the CR4
> register. But "MOV CR4,AX" is a privileged instruction. So - what to do?
Try executing an instruction of interest and catch #UD.
It might be easier to do in real or virtual 8086 mode (I avoided interrupt/exception handling in protected mode under DPMI).
Complete thread:
- SSE instructions in DOS programs? - Laaca, 02.01.2019, 00:07
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- SSE instructions in DOS programs? - alexfru, 02.01.2019, 00:31
- SSE instructions in DOS programs? - Rugxulo, 02.01.2019, 10:08
- SSE instructions in DOS programs? - RayeR, 02.01.2019, 22:56
- SSE instructions in DOS programs? - Laaca, 03.01.2019, 12:51
- SSE instructions in DOS programs? - Laaca, 03.01.2019, 12:52
- SSE instructions in DOS programs? - RayeR, 03.01.2019, 14:32
- SSE instructions in DOS programs? - RayeR, 03.01.2019, 14:39
- SSE instructions in DOS programs? - marcov, 04.01.2019, 23:37
- SSE instructions in DOS programs? - Rugxulo, 12.01.2019, 23:54
- SSE instructions in DOS programs? - RayeR, 13.01.2019, 16:44
- SSE instructions in DOS programs? - Rugxulo, 12.01.2019, 23:54
- SSE instructions in DOS programs? - Laaca, 03.01.2019, 12:51
Mix view