Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-26 Thread Steven Bosscher
On Mon, Jun 25, 2012 at 10:46 AM, Eric Botcazou ebotca...@libertysurf.fr wrote: It looks like DONT_USE_BUILTIN_SETJMP was invented for the IA-64, probably because of the Register Stack Engine.  But SPARC also has register windows, albeit less sophisticated, and can do without it.  Morever, the

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-26 Thread Richard Henderson
On 06/26/2012 01:55 AM, Steven Bosscher wrote: If __builtin_setjmp actually does work for ia64, why should we keep DONT_USE_BUILTIN_SETJMP? Could it break user code somehow? It's an ABI change for anyone using --enable-sjlj-exceptions. But I don't know who that would be... r~

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-26 Thread Steven Bosscher
On Tue, Jun 26, 2012 at 7:09 PM, John David Anglin dave.ang...@bell.net wrote: On 6/26/2012 11:38 AM, Richard Henderson wrote: On 06/26/2012 01:55 AM, Steven Bosscher wrote: If __builtin_setjmp actually does work for ia64, why should we keep DONT_USE_BUILTIN_SETJMP? Could it break user code

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-26 Thread John David Anglin
On 6/26/2012 1:21 PM, Steven Bosscher wrote: On Tue, Jun 26, 2012 at 7:09 PM, John David Anglin dave.ang...@bell.net wrote: On 6/26/2012 11:38 AM, Richard Henderson wrote: On 06/26/2012 01:55 AM, Steven Bosscher wrote: If __builtin_setjmp actually does work for ia64, why should we keep

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-26 Thread Mike Stump
On Jun 26, 2012, at 1:55 AM, Steven Bosscher wrote: On Mon, Jun 25, 2012 at 10:46 AM, Eric Botcazou ebotca...@libertysurf.fr wrote: It looks like DONT_USE_BUILTIN_SETJMP was invented for the IA-64, probably because of the Register Stack Engine. But SPARC also has register windows, albeit

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread Eric Botcazou
The PA and SPARC back ends do not define DONT_USE_BUILTIN_SETJMP, so they also do not have to define JMP_BUF_SIZE. So: * config/sparc/sparc.h (JMP_BUF_SIZE): Do not define. * config/pa/pa.h (JMP_BUF_SIZE): Likewise. OK for trunk? OK for the SPARC, thanks. What about the

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread Steven Bosscher
On Mon, Jun 25, 2012 at 12:31 AM, DJ Delorie d...@redhat.com wrote: The rl78 apparently doesn't know what it wants to do: /* NOTE: defined but zero means dwarf2 debugging, but sjlj EH.  */ #define DWARF2_UNWIND_INFO 0 /*#define DONT_USE_BUILTIN_SETJMP 1*/ #undef DONT_USE_BUILTIN_SETJMP

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread Steven Bosscher
On Mon, Jun 25, 2012 at 9:13 AM, Eric Botcazou ebotca...@libertysurf.fr wrote: The PA and SPARC back ends do not define  DONT_USE_BUILTIN_SETJMP, so they also do not have to define JMP_BUF_SIZE. So:         * config/sparc/sparc.h (JMP_BUF_SIZE): Do not define.         * config/pa/pa.h

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread Tristan Gingold
On Jun 25, 2012, at 10:26 AM, Steven Bosscher wrote: On Mon, Jun 25, 2012 at 9:13 AM, Eric Botcazou ebotca...@libertysurf.fr wrote: The PA and SPARC back ends do not define DONT_USE_BUILTIN_SETJMP, so they also do not have to define JMP_BUF_SIZE. So: * config/sparc/sparc.h

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread Eric Botcazou
Right, I didn't look at the details of the uses of DONT_USE_BUILTIN_SETJMP and JMP_BUF_SIZE but it looks like the ones in picochip and stormy16 are redundant too: For picochip, this port defines DONT_USE_BUILTIN_SETJMP but in the .c file (and after all #includes), so it is never exported and

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread DJ Delorie
Let me try again then... RL78 is confusing and it took a while to get it to work right. Please don't change it ;-)

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread Eric Botcazou
RL78 is confusing and it took a while to get it to work right. Please don't change it ;-) But we can certainly remove stuff that doesn't do anything; in particular, these 3 lines /*#define DONT_USE_BUILTIN_SETJMP 1*/ #undef DONT_USE_BUILTIN_SETJMP #define JMP_BUF_SIZE (8*3+8) can be proved

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-25 Thread DJ Delorie
But we can certainly remove stuff that doesn't do anything; in particular, these 3 lines /*#define DONT_USE_BUILTIN_SETJMP 1*/ #undef DONT_USE_BUILTIN_SETJMP #define JMP_BUF_SIZE (8*3+8) can be proved to be equivalent to the empty set. If you say so, go for it ;-)

[patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-24 Thread Steven Bosscher
Hello, For targets that define DONT_USE_BUILTIN_SETJMP, the JMP_BUF_SIZE macro can be used to set the size of the exception jump buffer. The JMP_BUF_SIZE macro is not used unless DONT_USE_BUILTIN_SETJMP is defined. See gcc/except.c and libgcc/unwind-sjlj.c. The PA and SPARC back ends do not

Re: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP

2012-06-24 Thread DJ Delorie
The rl78 apparently doesn't know what it wants to do: /* NOTE: defined but zero means dwarf2 debugging, but sjlj EH. */ #define DWARF2_UNWIND_INFO 0 /*#define DONT_USE_BUILTIN_SETJMP 1*/ #undef DONT_USE_BUILTIN_SETJMP #define JMP_BUF_SIZE (8*3+8) But I'll leave that to an rl78