RFR(S): 7147740: add assertions to check stack alignment on VM entry from generated code (x64)

Roland Westrelin roland.westrelin at oracle.com
Thu Feb 23 09:19:49 PST 2012

> I asked about all x86 platforms. Why do you think it is not 16 bytes in 32bit VM. Looking on x86_32.ad we do align to
> StackAlignmentInBytes.

It is for the compiled code we generate. I don't think it's true for interpreted code. Also when we call the runtime and push arguments on the stack the alignment is not longer 16 bytes. And it's not true for the C++ code because the platform alignment constraint is weaker. So if we read SP from the runtime code then it's very unlikely to be aligned on 16 bytes.

Maybe I should have made this clearer: the purpose of the asserts is to check that by the time we enter the runtime we honor the platform ABI so that code generated by the C compiler that rely on this assignment won't break.


More information about the hotspot-compiler-dev mailing list