[M3devel] double double double double checking jmp_buf size/alignment

Randy Coleburn rcolebur at SCIRES.COM
Wed Jan 6 21:03:02 CET 2010


Jay:

Results on the following platforms are all identical:

Windows 2000, Intel Pentium 3:  64 4
Windows XP, Intel Core Duo T2400:  64 4
Windows Vista, Intel Core2 Duo P9600:  64 4

Regards,
Randy Coleburn

From: jayk123 at hotmail.com [mailto:jayk123 at hotmail.com] On Behalf Of Jay K
Sent: Wednesday, January 06, 2010 8:18 AM
To: m3devel
Subject: Re: [M3devel] double double double double checking jmp_buf size/alignment

Was truncated!..edited slightly to avoid..

________________________________
From: jay.krell at cornell.edu
To: m3devel at elegosoft.com
Subject: double double double double checking jmp_buf size/alignment
Date: Wed, 6 Jan 2010 12:28:02 +0000

Getting this right is very important.
  Well, we can overstate but it is wasteful.


So anyone with any time, please compile/run this and send the "platform" (uname -a) and the output, thanks.
Or look at m3-libs/m3core/src/C/*/Csetjmp.i3 and
m3-sys/m3middle/src/Target.m3 and see if all three agree.


I have checked a bunch of systems myself but extra checking is good.


If you have a system we do not yet or any longer support, those are ok too.
 (e.g. Alpha_*, ARM_*, MIPS_*, *_Irix, *_VMS, *_Tru64 etc.)


#include <setjmp.h>
#include <stdio.h>

#ifdef __GNUC__
#define ALIGN_OF(x) ((int)(sizeof(struct { char a; x b; }) - sizeof(x)))
#else
#define ALIGN_OF(x) ((int)__alignof(x))

int main()
{
  printf("%d %d\n", (int)sizeof(jmp_buf), ALIGN_OF(jmp_buf));
  return 0;
}


Thanks,
 - Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100106/15d709fb/attachment-0002.html>


More information about the M3devel mailing list