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 (JMP_BUF_SIZE): Do not define. >>> * config/pa/pa.h (JMP_BUF_SIZE): Likewise. >>> >>> OK for trunk? >> >> OK for the SPARC, thanks. > > And thanks to you for the ack! :-) > >> What about the Stormy16 and the picoChip? It seems >> like a cleanup is possible in this area for them as well. > > 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 not > otherwise referenced in picochip.c, hence dead: > config/picochip/picochip.c:#undef DONT_USE_BUILTIN_SETJMP > config/picochip/picochip.c:#define DONT_USE_BUILTIN_SETJMP 1 > > stormy16 only undefines DONT_USE_BUILTIN_SETJMP (which is the default > anyway) so these two lines are redundant: > config/stormy16/stormy16.h:#undef DONT_USE_BUILTIN_SETJMP > config/stormy16/stormy16.h:#define JMP_BUF_SIZE 8 > > I will remove those lines with the same commit. > > That leaves only rl78 and ia64: > $ egrep "DONT_USE_BUILTIN_SETJMP|JMP_BUF_SIZE" config/* config/*/* > config/ia64/freebsd.h:#define JMP_BUF_SIZE 76 > config/ia64/hpux.h:#define JMP_BUF_SIZE (8 * 76) > config/ia64/ia64.h:#define DONT_USE_BUILTIN_SETJMP > config/ia64/linux.h:#define JMP_BUF_SIZE 76 > config/ia64/vms.h:#define JMP_BUF_SIZE (8 * 76) > config/rl78/rl78.h:/*#define DONT_USE_BUILTIN_SETJMP 1*/ > config/rl78/rl78.h:#undef DONT_USE_BUILTIN_SETJMP > config/rl78/rl78.h:#define JMP_BUF_SIZE (8*3+8) > > The ia64 ones have no useful comments. The 76 is a magic number and it > seems strange to me that the size of JMP_BUF_SIZE depends on the OS > (linux and freebsd have 76, hpux has 8*76, and vms copied the hpux > example with the comment: "Maybe same as HPUX? Needs to be > checked."). And anyway, these macros are only relevant for SJLJ > exceptions - who uses that on ia64??
FTR, until recently I think it was not possible to use SJLJ on ia64 due to a typo. On hpux, the definition of jmp_buf is: # define _JBLEN 320 typedef __float80 jmp_buf[_JBLEN/4]; which looks weird... Tristan.