Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Apr 2000 10:12:04 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Steve Price <sprice@hiwaay.net>
Cc:        freebsd-alpha@freebsd.org
Subject:   Re: need help porting JDK2 to alpha
Message-ID:  <Pine.BSF.4.21.0004301011500.79607-100000@salmon.nlsystems.com>
In-Reply-To: <Pine.OSF.4.21.0004291305380.18420-100000@fly.HiWAAY.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 29 Apr 2000, Steve Price wrote:

> On Mon, 24 Apr 2000, Doug Rabson wrote:
> 
> # You can initialise the pc by setting sc->sc_pc. What are death_func and
> # arg used for? If these are intended to be arguments to some function
> # located at *pc, you can initialise sc->sc_regs[R_A0..R-A5] with up to six
> # argument values. If you need the function at *pc to return to some
> # specific location, set sc->sc_regs[R_RA] to a suitable return address.
> 
> Oops, I was re-reading your response and just noticed there was
> a question in there.  The idea is to setup the sigjmp_buf structure
> so that on a call to siglongjmp the function death_func is called with
> the arguments pc and arg.  The code I have now looks like this and
> appears to almost work.
> 
>     uc->jmpbuf->_sjb[2]  = death_func;	/* sc_pc */
>     uc->jmpbuf->_sjb[20] = pc;		/* sc_regs[R_A0] */
>     uc->jmpbuf->_sjb[21] = arg;		/* sc_regs[R_A1] */
>     uc->jmpbuf->_sjb[34] = sp;		/* sc_regs[R_SP] */
>     uc->jmpbuf->_sjb[35] = 0xACEDBADD;  /* magic number for longjmp */
> 
> I don't think we need to set sc_regs[R_RA].

This looks right. Lets hope it works :-)

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 20 8442 9037




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004301011500.79607-100000>