I have a global function func()
implemented in assembly, declared as an external in a C++ source file:
extern "C" void func(char*);
func()
requires the stack to be aligned at 32 bytes. Now, I could:
- Force all my calls to be aligned at 32 bytes passing the appropriate flag to the compiler
- Align the stack in the assembly source of
func()
- Somehow force the calls to
func()
to be aligned at 32 bytes instead of a default of 16.
I don't want to do 1. So my question is, how to do 3? Perhaps the most efficient way is to just enforce alignment, as in 2.