SSE instructions in DOS programs? (Developers)
> > There was a problem that SSE
> > code of FFMPEG didn't work under DOS/DJGPP so I disabled all inline asm
> > code for SSE but I never went deep into it if there's some workaround.
>
> If e.g. the library for ffmpeg expects the stack aligned, but some code
> calling into ffmeg doesn't then you get trouble
There is a GCC option called "-mstackrealign" which should help with that. At least, it will do "and esp, -16" (maybe a bit more extra stuff beyond just that) which should help you.
IIRC, DJGPP's linkable COFF .o format is a bit less flexible in alignment (always four bytes??) versus MS COFF or other formats. You may instead wish to manually align the stack only for certain functions via attribute force_align_arg_pointer.
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