<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Randy, thanks, we agree.<BR>
<BR>
Target.m3:<BR>
| Systems.I386_INTERIX =><BR>
(* Visual C++'s 16, plus two ints, one to say if sigmask saved, and one to possibly save it. *)<BR>
Jumpbuf_size := 18 * Address.size;<BR>
<BR>
| Systems.NT386, Systems.NT386GNU,<BR> Systems.I386_NT, Systems.I386_CYGWIN,<BR> Systems.I386_MINGW =><BR>
(* Cygwin is 13, Visual C++ is 16. Interix is 18.<BR> Use 18 for interop.<BR> Note that Cygwin's setjmp.h header is wrong, off by a factor of 4.<BR> Cygwin provides setjmp and _setjmp that resolve the same.<BR> Visual C++ provides only _setjmp.<BR> Visual C++ also has _setjmp3 that the compiler generates<BR> a call to. In fact _setjmp appears to only use 8 ints<BR> and _setjmp3 appears to use more. Consider switching to _setjmp3.<BR> *)<BR> Jumpbuf_size := (18 * Address.size);<BR><BR>
- Jay<BR> <BR>
<HR id=stopSpelling>
From: rcolebur@SCIRES.COM<BR>To: m3devel@elegosoft.com<BR>Date: Wed, 6 Jan 2010 15:03:02 -0500<BR>Subject: Re: [M3devel] double double double double checking jmp_buf size/alignment<BR><BR>
<STYLE>
.ExternalClass .ecxshape
{;}
</STYLE>
<STYLE>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass span.ecxEmailStyle18
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;}
.ExternalClass div.ecxSection1
{page:Section1;}
</STYLE>
<DIV class=ecxSection1>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Jay:</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Results on the following platforms are all identical:</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Windows 2000, Intel Pentium 3: 64 4</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Windows XP, Intel Core Duo T2400: 64 4</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Windows Vista, Intel Core2 Duo P9600: 64 4</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Regards,</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Randy Coleburn</SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"> </SPAN></P>
<DIV>
<DIV style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P style="MARGIN-LEFT: 0.5in" class=ecxMsoNormal><B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> jayk123@hotmail.com [mailto:jayk123@hotmail.com] <B>On Behalf Of </B>Jay K<BR><B>Sent:</B> Wednesday, January 06, 2010 8:18 AM<BR><B>To:</B> m3devel<BR><B>Subject:</B> Re: [M3devel] double double double double checking jmp_buf size/alignment</SPAN></P></DIV></DIV>
<P style="MARGIN-LEFT: 0.5in" class=ecxMsoNormal> </P>
<P style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0in" class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 10pt">Was truncated!..edited slightly to avoid..<BR><BR></SPAN></P>
<DIV style="TEXT-ALIGN: center; MARGIN-LEFT: 0.5in" class=ecxMsoNormal align=center><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 10pt">
<HR id=ecxstopSpelling align=center SIZE=2 width="100%">
</SPAN></DIV>
<P style="MARGIN-LEFT: 0.5in" class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 10pt">From: jay.krell@cornell.edu<BR>To: m3devel@elegosoft.com<BR>Subject: double double double double checking jmp_buf size/alignment<BR>Date: Wed, 6 Jan 2010 12:28:02 +0000<BR><BR>Getting this right is very important.<BR> Well, we can overstate but it is wasteful.<BR><BR><BR>So anyone with any time, please compile/run this and send the "platform" (uname -a) and the output, thanks.<BR>Or look at m3-libs/m3core/src/C/*/Csetjmp.i3 and<BR>m3-sys/m3middle/src/Target.m3 and see if all three agree.<BR><BR><BR>I have checked a bunch of systems myself but extra checking is good.<BR><BR><BR>If you have a system we do not yet or any longer support, those are ok too.<BR> (e.g. Alpha_*, ARM_*, MIPS_*, *_Irix, *_VMS, *_Tru64 etc.)<BR><BR> <BR>#include <setjmp.h><BR>#include <stdio.h><BR><BR>#ifdef __GNUC__<BR>#define ALIGN_OF(x) ((int)(sizeof(struct { char a; x b; }) - sizeof(x)))<BR>#else<BR>#define ALIGN_OF(x) ((int)__alignof(x))<BR><BR>int main()<BR>{<BR> printf("%d %d\n", (int)sizeof(jmp_buf), ALIGN_OF(jmp_buf));<BR> return 0;<BR>}<BR><BR><BR>Thanks,<BR> - Jay</SPAN></P></DIV> </body>
</html>