On Thu, 3 Nov 2011, Mike Stump wrote:
> On Nov 3, 2011, at 2:14 AM, Eric Botcazou wrote:
>
> >>* except.c (init_eh): Fix setjmp buffer size calculations for
> >>targets where pointers are not word-sized.
> >
> > This will shrink the buffer for most such targets though.
>
> I prefer:
>
> If the comment is true, and it takes a pointer to five WORDS, why are
> we using POINTER_SIZE at all?
Because of the 2 lines just below:
tmp = build_index_type (tmp);
tmp = build_array_type (ptr_type_node, tmp);
> Does it actually take a pointer to five POINTERS?
No.
> If so, w
> I prefer:
>
> #ifndef TARGET_BUILTIN_JMP_BUF_SIZE
> #define TARGET_BUILTIN_JMP_BUF_SIZE 5
> #endif
> /* builtin_setjmp takes a pointer to TARGET_BUILTIN_JMP_BUF_SIZE
> words. */ tmp = build_int_cst (NULL_TREE, TARGET_BUILTIN_JMP_BUF_SIZE *
> BITS_PER_WORD / POINTER_SIZE - 1);
>
> This does
If the comment is true, and it takes a pointer to five WORDS, why are
we using POINTER_SIZE at all? Does it actually take a pointer to five
POINTERS? If so, where did the '4' come from?
>/* builtin_setjmp takes a pointer to 5 words. */
> - tmp = size_int (5 * BITS_PER_WORD / POINT
On Nov 3, 2011, at 2:14 AM, Eric Botcazou wrote:
>> * except.c (init_eh): Fix setjmp buffer size calculations for
>> targets where pointers are not word-sized.
>
> This will shrink the buffer for most such targets though.
I prefer:
#ifndef TARGET_BUILTIN_JMP_BUF_SIZE
#define TARGET_BU
> * except.c (init_eh): Fix setjmp buffer size calculations for
> targets where pointers are not word-sized.
This will shrink the buffer for most such targets though.
> Index: gcc/except.c
> ===
> --- gcc/except.c (r
The RL78 port has 8 bit registers and 16 bit pointers. The existing
calculation resulted in a buffer that was too small for the five
values needed.
* except.c (init_eh): Fix setjmp buffer size calculations for
targets where pointers are not word-sized.
Index: gcc/except.c
==