Add target-specific macro for stack alignment in assembler backend.

This commit is contained in:
Mike Pall 2011-05-16 02:43:14 +02:00
parent 6cb123bb99
commit dab4bcafba
2 changed files with 2 additions and 1 deletions

View File

@ -729,7 +729,7 @@ static int32_t asm_stack_adjust(ASMState *as)
{ {
if (as->evenspill <= SPS_FIXED) if (as->evenspill <= SPS_FIXED)
return 0; return 0;
return sps_scale((as->evenspill - SPS_FIXED + 3) & ~3); return sps_scale(sps_align(as->evenspill));
} }
/* Must match with hash*() in lj_tab.c. */ /* Must match with hash*() in lj_tab.c. */

View File

@ -136,6 +136,7 @@ enum {
#endif #endif
#define sps_scale(slot) (4 * (int32_t)(slot)) #define sps_scale(slot) (4 * (int32_t)(slot))
#define sps_align(slot) (((slot) - SPS_FIXED + 3) & ~3)
/* -- Exit state ---------------------------------------------------------- */ /* -- Exit state ---------------------------------------------------------- */