[fpc-devel] Stack alignment on i386

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Dec 22 17:04:03 CET 2011


On 22 Dec 2011, at 16:42, Sven Barth wrote:

> While with OpenCV this issue might be solved by recompiling it  
> (which I'd yet need to look into, because I'm simply using the  
> provided binaries), what should be done about closed source code?

Closed source code should be compiled with a compiler that respects  
the ABI by default. I guess most of it is compiled with Microsoft  
Visual Studio, which does presumably does that. I don't think that any  
compiler other than GCC can create code for Win32 that assumes a 16- 
byte aligned stack.

> Somehow this motivates me more to add a "stackalignment" modifier...

Then you would have to add this to all routines that may (directly or  
indirectly) a routine from a broken library.


Jonas



More information about the fpc-devel mailing list