But http://dbp-consulting.com/tutorials/debugging/linuxProgramSt...
does suggest zeroing the top-most frame (%ebp) and making sure the stack is 16-byte aligned might also be worth doing. (Possibly it’s already 16-byte aligned already because you jmp to main instead of calling it though?)
Yep, it marks function frame boundaries. If you don't particularly care, you may want to consider compiling with -fomit-frame-pointer and the compiler will return this register back to the set of general purpose ones for it to use.
> i'm not sure if alignment makes any measurable difference. if it does, it'll be worth doing.
It will if you end up emitting any SSE instructions, because they will cause loads and stores that need to be aligned.
a=arg1 b=arg2 k c.k[1]: https://bitbucket.org/ngn/k/src/b54eb5cfea5eb821fe1de68d2a8a...
across operating systems: it works on linux and freebsd as-is (thanks bakul), and with a few changes on windows+libc (thanks ktye) - https://github.com/ktye/i/tree/master/_/ngn though i personally never use windows