[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Tue Jan 4 13:48:34 CET 2011


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	11/01/04 13:48:34

Modified files:
	cm3/m3-sys/m3middle/src/: Target.m3 
	cm3/m3-libs/m3core/src/C/: m3makefile 
	cm3/m3-libs/m3core/src/C/Common/: m3makefile 
	cm3/m3-libs/m3core/src/C/I386_CYGWIN/: Csetjmp.i3 
	cm3/m3-libs/m3core/src/C/I386_MINGW/: Csetjmp.i3 
	cm3/m3-libs/m3core/src/C/I386_NT/: Csetjmp.i3 
	cm3/m3-libs/m3core/src/C/NT386/: Csetjmp.i3 
Added files:
	cm3/m3-libs/m3core/src/C/Common/: COPYRIGHT Csetjmp.c Csetjmp.i3 
Removed files:
	cm3/m3-libs/m3core/src/C/ALPHA32_VMS/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/ALPHA64_VMS/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/ALPHA_LINUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/ALPHA_OPENBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/ALPHA_OSF/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/AMD64_DARWIN/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/AMD64_FREEBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/AMD64_LINUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/AMD64_NETBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/AMD64_OPENBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/AMD64_SOLARIS/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/ARMEL_LINUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/ARM_DARWIN/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/FreeBSD4/: COPYRIGHT Csetjmp.i3 
	                                    m3makefile 
	cm3/m3-libs/m3core/src/C/I386_DARWIN/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/I386_FREEBSD/: COPYRIGHT Csetjmp.i3 
	                                        m3makefile 
	cm3/m3-libs/m3core/src/C/I386_INTERIX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/I386_LINUX/: COPYRIGHT Csetjmp.i3 
	                                      m3makefile 
	cm3/m3-libs/m3core/src/C/I386_NETBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/I386_OPENBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/I386_SOLARIS/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/LINUXLIBC6/: COPYRIGHT Csetjmp.i3 
	                                      m3makefile 
	cm3/m3-libs/m3core/src/C/MIPS64EL_OPENBSD/: Csetjmp.i3 
	                                            m3makefile 
	cm3/m3-libs/m3core/src/C/MIPS64_OPENBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/NetBSD2_i386/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/PA32_HPUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/PA64_HPUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/PPC32_OPENBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/PPC64_DARWIN/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/PPC_DARWIN/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/PPC_LINUX/: COPYRIGHT Csetjmp.i3 
	                                     m3makefile 
	cm3/m3-libs/m3core/src/C/SOLgnu/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/SOLsun/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/SPARC32_LINUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/SPARC32_SOLARIS/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/SPARC64_LINUX/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/SPARC64_OPENBSD/: Csetjmp.i3 m3makefile 
	cm3/m3-libs/m3core/src/C/SPARC64_SOLARIS/: Csetjmp.i3 m3makefile 

Log message:
	Set jumpbuf_align to 64 for all targets.
	
	We'd really like to use 2 * BYTESIZE(INTEGER) for all targets
	except PPC_LINUX, but that isn't expressible. This is therefore
	as far as we know, incorrect for PA64_HPUX and SPARC64_SOLARIS,
	and non-ideal for PPC_LINUX, roughly the same as it ever was
	(well, the middle end got it right, but the runtime didn't,
	and they do need to match; so it was seemingly wrong, but
	somehow worked on PPC_LINUX)
	
	In future, hopefully, compiler will inject the type instead
	of depending on it being declared elsewhere in Modula-3.
	
	In future, hopefully, this code will fall away on the majority
	of platforms/users -- i.e. if we use the gcc stack walker.
	But it will still stay around in some form for portability
	to non-gcc platforms. So injecting the type is still desirable.
	
	This removes lots of target-dependence.
	This has the downside of introducing an extra 4 bytes of unnecessary
	frame size on platforms where 4 byte alignment of jmpbuf is sufficient.
	(Note that we have and continue to bloat the jmpbuf for other reasons.
	- sometimes it was sigjmpbuf, no longe
	- sometimes it is plain wrong, e.g. LINUXLIBC6, still
	- sometimes for hypothetical interop e.g. NT <=> Interix)
	
	If RaiseActivation were one more or one less word,
	or if the frame has an otherwise odd number of words,
	the wastage should be removable by offseting the location
	of RaiseActivation. That is, alignment should be achievable
	by via hole, but via offseting the enclosing base and
	possibly using the hole that that creates.
	
	In either case, I'm inclined to go one step further and pass
	an extern const to alloca and only put a pointer to the jmpbuf
	in the "EF1", dramatically further eliminating target-dependence.
	We are already calling pthread_getspecific and setjmp, so alloca
	seems maybe a further reasonable deoptimization in an already slow path.
	Perhaps we could somehow combine the calls (not easy, given
	how setjmp and alloca are so special). This would presumably
	also address the alignment problem -- assuming alloca knows
	to return a pointer aligned enough for "anything", i.e. including
	a jmpbuf.
	
	There are still some platform-dependent Csetjmp.i3 files (NT)
	in order to call longjmp instead of the more common _longjmp.
	Testing, reading headers, and/or disasm will hopefully show
	that such platforms have _longjmp and it is equivalent. Soon.




More information about the M3commit mailing list