<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
straightforward diff attached<br><br>> Date: Tue, 4 Jan 2011 13:48:34 +0000<br>> To: m3commit@elegosoft.com<br>> From: jkrell@elego.de<br>> Subject: [M3commit] CVS Update: cm3<br>> <br>> CVSROOT: /usr/cvs<br>> Changes by: jkrell@birch. 11/01/04 13:48:34<br>> <br>> Modified files:<br>> cm3/m3-sys/m3middle/src/: Target.m3 <br>> cm3/m3-libs/m3core/src/C/: m3makefile <br>> cm3/m3-libs/m3core/src/C/Common/: m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_CYGWIN/: Csetjmp.i3 <br>> cm3/m3-libs/m3core/src/C/I386_MINGW/: Csetjmp.i3 <br>> cm3/m3-libs/m3core/src/C/I386_NT/: Csetjmp.i3 <br>> cm3/m3-libs/m3core/src/C/NT386/: Csetjmp.i3 <br>> Added files:<br>> cm3/m3-libs/m3core/src/C/Common/: COPYRIGHT Csetjmp.c Csetjmp.i3 <br>> Removed files:<br>> cm3/m3-libs/m3core/src/C/ALPHA32_VMS/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/ALPHA64_VMS/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/ALPHA_LINUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/ALPHA_OPENBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/ALPHA_OSF/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/AMD64_DARWIN/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/AMD64_FREEBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/AMD64_LINUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/AMD64_NETBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/AMD64_OPENBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/AMD64_SOLARIS/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/ARMEL_LINUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/ARM_DARWIN/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/FreeBSD4/: COPYRIGHT Csetjmp.i3 <br>> m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_DARWIN/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_FREEBSD/: COPYRIGHT Csetjmp.i3 <br>> m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_INTERIX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_LINUX/: COPYRIGHT Csetjmp.i3 <br>> m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_NETBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_OPENBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/I386_SOLARIS/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/LINUXLIBC6/: COPYRIGHT Csetjmp.i3 <br>> m3makefile <br>> cm3/m3-libs/m3core/src/C/MIPS64EL_OPENBSD/: Csetjmp.i3 <br>> m3makefile <br>> cm3/m3-libs/m3core/src/C/MIPS64_OPENBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/NetBSD2_i386/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/PA32_HPUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/PA64_HPUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/PPC32_OPENBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/PPC64_DARWIN/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/PPC_DARWIN/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/PPC_LINUX/: COPYRIGHT Csetjmp.i3 <br>> m3makefile <br>> cm3/m3-libs/m3core/src/C/SOLgnu/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/SOLsun/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/SPARC32_LINUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/SPARC32_SOLARIS/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/SPARC64_LINUX/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/SPARC64_OPENBSD/: Csetjmp.i3 m3makefile <br>> cm3/m3-libs/m3core/src/C/SPARC64_SOLARIS/: Csetjmp.i3 m3makefile <br>> <br>> Log message:<br>> Set jumpbuf_align to 64 for all targets.<br>> <br>> We'd really like to use 2 * BYTESIZE(INTEGER) for all targets<br>> except PPC_LINUX, but that isn't expressible. This is therefore<br>> as far as we know, incorrect for PA64_HPUX and SPARC64_SOLARIS,<br>> and non-ideal for PPC_LINUX, roughly the same as it ever was<br>> (well, the middle end got it right, but the runtime didn't,<br>> and they do need to match; so it was seemingly wrong, but<br>> somehow worked on PPC_LINUX)<br>> <br>> In future, hopefully, compiler will inject the type instead<br>> of depending on it being declared elsewhere in Modula-3.<br>> <br>> In future, hopefully, this code will fall away on the majority<br>> of platforms/users -- i.e. if we use the gcc stack walker.<br>> But it will still stay around in some form for portability<br>> to non-gcc platforms. So injecting the type is still desirable.<br>> <br>> This removes lots of target-dependence.<br>> This has the downside of introducing an extra 4 bytes of unnecessary<br>> frame size on platforms where 4 byte alignment of jmpbuf is sufficient.<br>> (Note that we have and continue to bloat the jmpbuf for other reasons.<br>> - sometimes it was sigjmpbuf, no longe<br>> - sometimes it is plain wrong, e.g. LINUXLIBC6, still<br>> - sometimes for hypothetical interop e.g. NT <=> Interix)<br>> <br>> If RaiseActivation were one more or one less word,<br>> or if the frame has an otherwise odd number of words,<br>> the wastage should be removable by offseting the location<br>> of RaiseActivation. That is, alignment should be achievable<br>> by via hole, but via offseting the enclosing base and<br>> possibly using the hole that that creates.<br>> <br>> In either case, I'm inclined to go one step further and pass<br>> an extern const to alloca and only put a pointer to the jmpbuf<br>> in the "EF1", dramatically further eliminating target-dependence.<br>> We are already calling pthread_getspecific and setjmp, so alloca<br>> seems maybe a further reasonable deoptimization in an already slow path.<br>> Perhaps we could somehow combine the calls (not easy, given<br>> how setjmp and alloca are so special). This would presumably<br>> also address the alignment problem -- assuming alloca knows<br>> to return a pointer aligned enough for "anything", i.e. including<br>> a jmpbuf.<br>> <br>> There are still some platform-dependent Csetjmp.i3 files (NT)<br>> in order to call longjmp instead of the more common _longjmp.<br>> Testing, reading headers, and/or disasm will hopefully show<br>> that such platforms have _longjmp and it is equivalent. Soon.<br>> <br> </body>
</html>