SSE instructions in DOS programs? (Developers)
Aha, here is better description:
https://wiki.osdev.org/FPU
CR4.OSFXSR (bit 9)
Enables 128-bit SSE support. When clear, most SSE instructions will cause an invalid opcode, and FXSAVE and FXRSTOR will only include the legacy FPU state. When set, SSE is allowed and the XMM and MXCSR registers are accessible, which also means that your OS should maintain those additional registers. Trying to set this bit on a CPU without SSE will cause an exception, so you should check for SSE (or long mode) support first.
CR4.OSXMMEXCPT (bit 10)
Enables the #XF exception. When clear, SSE will work until an exception is generated, after which all SSE instructions will fail with an invalid opcode. When set, the exception handler is called instead and the problem may be diagnosed and reported. Again, you can't set this bit without ensuring SSE support is present
So you MUST enable bit 9 but MAY not enable bit 10. Of course check CPUID first before touching this (and check for CPUID itself on 386 :).
---
DOS gives me freedom to unlimited HW access.
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