assert(code);
+ /* slots allocated by register allocator plus saved registers */
+
#ifdef HAS_4BYTE_STACKSLOT
count = code->memuse + code->savedintcount + 2*code->savedfltcount;
#else
#endif
/* add slots needed in synchronized methods */
+
count += code_get_sync_slot_count(code);
+ /* keep stack aligned */
+
#if defined(__X86_64__)
- /* keep stack 16-byte aligned */
+ /* the x86_64 codegen only aligns the stack in non-leaf methods */
if (!code->isleafmethod || opt_verbosecall)
count |= 1; /* even when return address is added */
#endif
+ /* XXX align stack on alpha */
+#if defined(__MIPS__)
+ if (code->isleafmethod)
+ count = (count + 1) & ~1;
+ else
+ count |= 1; /* even when return address is added */
+#endif
+
#if defined(__POWERPC__)
/* keep stack 16-byte aligned */
count = (count + 3) & ~3;