word-align stack sharing in continuations

svn: r2563
This commit is contained in:
Robby Findler 2006-03-31 22:36:06 +00:00
parent 05b4ec317d
commit a47001cfc5

View File

@ -409,6 +409,12 @@ static long find_same(char *p, char *low, long max_size)
prevent stack overflow. */
# define MAX_STACK_DIFF 4096
#ifdef SIXTY_FOUR_BIT_INTEGERS
# define SHARED_STACK_ALIGNMENT 8
#else
# define SHARED_STACK_ALIGNMENT 4
#endif
if (max_size > MAX_STACK_DIFF) {
cnt = max_size - MAX_STACK_DIFF;
max_size = MAX_STACK_DIFF;
@ -428,6 +434,10 @@ static long find_same(char *p, char *low, long max_size)
}
}
if (cnt & (SHARED_STACK_ALIGNMENT - 1)) {
cnt -= (cnt & (SHARED_STACK_ALIGNMENT - 1));
}
return cnt;
}