[M3devel] factoring jmpbuf size via alloca(global constant)?

Jay K jay.krell at cornell.edu
Thu Dec 30 15:28:31 CET 2010


factoring out jmpbuf size?


Hey, um, how about something like this:


somefile.c:
 #include <setjmp.h>
 extern const int sizeof_jmpbuf = sizeof(jmp_buf);
 

where the frontend would allocate a local jmp_buf,
instead issue a call to alloca(sizeof_jmpbuf),
actually reading the constant out of the global.


Yes I know this is a deoptimization.
It is already slow.
We hope hope hope to replace it all anyway.


This would remove lots of target-specific code in Target.m3.


Related, I'm again trying removing from m3core the knowledge
of the size/alignment of jmpbuf. Or rather, to see if it really
needs it.


 - Jay

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101230/7717d860/attachment-0001.html>


More information about the M3devel mailing list