Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

SSE instructions in DOS programs? (Developers)

posted by Rugxulo(R) Homepage, Usono, 12.01.2019, 23:54

> > 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:

Back to the forum
Board view  Mix view
15889 Postings in 1469 Threads, 269 registered users, 89 users online (0 registered, 89 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum