From owner-freebsd-alpha Sun Apr 30 2: 6:57 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from finch-post-10.mail.demon.net (finch-post-10.mail.demon.net [194.217.242.38]) by hub.freebsd.org (Postfix) with ESMTP id 184CA37B71A for ; Sun, 30 Apr 2000 02:06:53 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1) id 12lpgg-000GRY-0A; Sun, 30 Apr 2000 09:06:50 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id KAA92818; Sun, 30 Apr 2000 10:08:04 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Sun, 30 Apr 2000 10:12:04 +0100 (BST) From: Doug Rabson To: Steve Price Cc: freebsd-alpha@freebsd.org Subject: Re: need help porting JDK2 to alpha In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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