}
// Align the stack with STACK_ALIGN value.
- int adjustFrameSize = compLclFrameSize;
+ int adjustFrameSize = compLclFrameSize;
#if defined(UNIX_X86_ABI)
+ bool isEbpPushed = codeGen->isFramePointerUsed();
+#if DOUBLE_ALIGN
+ isEbpPushed |= genDoubleAlign();
+#endif
// we need to consider spilled register(s) plus return address and/or EBP
- int adjustCount = compCalleeRegsPushed + 1 + (codeGen->isFramePointerUsed() ? 1 : 0);
+ int adjustCount = compCalleeRegsPushed + 1 + (isEbpPushed ? 1 : 0);
adjustFrameSize += (adjustCount * REGSIZE_BYTES) % STACK_ALIGN;
#endif
if ((adjustFrameSize % STACK_ALIGN) != 0)