[M3devel] SaveRegsInStack

Jay K jay.krell at cornell.edu
Sun Nov 22 00:40:03 CET 2009


 > No, those don't have the desired effect on SPARC.
 

ok. I was somewhat guessing.

 

 > Why wouldn't SPARC* all have stack walkers?

 

Because I'm lazy and doubt anyone cares much about SPARC{32,64}_{LINUX,FREEBSD,NETBSD}, SPARC64_SOLARIS.

? But I can maybe try it at some point.

 

I also expect the way to go is use libunwind for nearly all targets, even probably SPARC*.

 

 > It would be good to have it in one place for *all* SPARC targets.  Where to put it

 

How about a new src/runtime/common/RTStackC.c, compiled on all platforms but with #ifdefs (the same #ifdefs as are currently used, but revisiting them at some point, the NETBSD and such seem suspicious).

I think I'll do that shortly.

 

There is also TARGET_ARCH defined in the config files.

We could do

if exist(TARGET_ARCH/m3makefile)

  include_dir(TARGET_ARCH)

end

 

(similarly there is TARGET_OS).

 

 - Jay
 


From: hosking at cs.purdue.edu
Date: Sat, 21 Nov 2009 17:02:23 -0500
To: jay.krell at cornell.edu
CC: m3devel at elegosoft.com
Subject: Re: [M3devel] SaveRegsInStack




On 21 Nov 2009, at 15:38, Jay K wrote:


Tony, it bugs me that we have three copies of this code.
Would it be reasonable and not very inefficient
and maybe somewhat portable to replace it with
setjmp or getcontext or alloca(1)?



No, those don't have the desired effect on SPARC.


 Or can we go back to having RTStack call RTMachine?
(Imagine if SPARC* all had stack walkers, though I
doubt that will happen, other than via libunwind.)



Why wouldn't SPARC* all have stack walkers?  Their stack frames are trivial to unwind.
I agree that it is annoying to have multiple copies of this code.  It would be good to have it in one place for *all* SPARC targets.  Where to put it?


 

 - Jay


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091121/9de1ce4b/attachment-0002.html>


More information about the M3devel mailing list