diff options
| -rw-r--r-- | src/lj_asm.c | 2 | ||||
| -rw-r--r-- | src/lj_target_x86.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 87c09bb9..8b984d8e 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
| @@ -729,7 +729,7 @@ static int32_t asm_stack_adjust(ASMState *as) | |||
| 729 | { | 729 | { |
| 730 | if (as->evenspill <= SPS_FIXED) | 730 | if (as->evenspill <= SPS_FIXED) |
| 731 | return 0; | 731 | return 0; |
| 732 | return sps_scale((as->evenspill - SPS_FIXED + 3) & ~3); | 732 | return sps_scale(sps_align(as->evenspill)); |
| 733 | } | 733 | } |
| 734 | 734 | ||
| 735 | /* Must match with hash*() in lj_tab.c. */ | 735 | /* Must match with hash*() in lj_tab.c. */ |
diff --git a/src/lj_target_x86.h b/src/lj_target_x86.h index 48b53b6d..5c24761e 100644 --- a/src/lj_target_x86.h +++ b/src/lj_target_x86.h | |||
| @@ -136,6 +136,7 @@ enum { | |||
| 136 | #endif | 136 | #endif |
| 137 | 137 | ||
| 138 | #define sps_scale(slot) (4 * (int32_t)(slot)) | 138 | #define sps_scale(slot) (4 * (int32_t)(slot)) |
| 139 | #define sps_align(slot) (((slot) - SPS_FIXED + 3) & ~3) | ||
| 139 | 140 | ||
| 140 | /* -- Exit state ---------------------------------------------------------- */ | 141 | /* -- Exit state ---------------------------------------------------------- */ |
| 141 | 142 | ||
