Laaca Czech republic, 02.01.2019, 00:07 |
SSE instructions in DOS programs? (Developers) |
Hi! --- |
alexfru USA, 02.01.2019, 00:31 @ Laaca |
SSE instructions in DOS programs? |
> What is the recomended way how to obtain whether I can use the SSE |
Rugxulo Usono, 02.01.2019, 10:08 @ Laaca |
SSE instructions in DOS programs? |
> Hi! |
RayeR CZ, 02.01.2019, 22:56 @ Laaca |
SSE instructions in DOS programs? |
> Internet says that it is enough to test the 9.bit and 10.bit in the CR4 --- |
Laaca Czech republic, 03.01.2019, 12:51 @ RayeR |
SSE instructions in DOS programs? |
In theory - SSE instructions use a new set of registers which have to be preserved when task swithing by OS. --- |
Laaca Czech republic, 03.01.2019, 12:52 @ Laaca |
SSE instructions in DOS programs? |
.. --- |
RayeR CZ, 03.01.2019, 14:32 @ Laaca |
SSE instructions in DOS programs? |
I guess that SSE should work without setting those 2 bits in CR4 - if you don't need turn on exceptions (code should work without them too). I'm not sure what exactly bit 9 does. FXSAVE instruction save FPU, MMX, SSE regs. context to given location in memory. But as I told for a single task OS it's not necessary if no other code will use this regs. Here is better description with some sample code --- |
RayeR CZ, 03.01.2019, 14:39 @ RayeR |
SSE instructions in DOS programs? |
Aha, here is better description: --- |
marcov 04.01.2019, 23:37 @ RayeR |
SSE instructions in DOS programs? |
> BTW you will need extra alignment for SSE data (and |
Rugxulo Usono, 12.01.2019, 23:54 @ marcov |
SSE instructions in DOS programs? |
> > There was a problem that SSE |
RayeR CZ, 13.01.2019, 16:44 (edited by RayeR, 13.01.2019, 23:10) @ Rugxulo |
SSE instructions in DOS programs? |
> There is a GCC option called "-mstackrealign" which should help with that. --- |