From owner-freebsd-alpha Mon Apr 24 4:38:57 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (Postfix) with ESMTP id DBB1637B936 for ; Mon, 24 Apr 2000 04:38:44 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1) id 12jhCH-000HCc-0C; Mon, 24 Apr 2000 11:38:38 +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 MAA04417; Mon, 24 Apr 2000 12:47:53 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Mon, 24 Apr 2000 12:44:03 +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, 22 Apr 2000, Steve Price wrote: > Evening UberHackers, > > I'm working on porting JDK2 to FreeBSD/Alpha. I've run into two > stumbling blocks that are well beyond my skills as a programmer > to overcome. The first one should be relatively easy for someone > that knows their way around the Alpha architecture so I'll include > the details in this message. The other one requires a bit of > assembly language programming skills. If you are interested in > that, contact me off-list and I'll fill you in on the details. > > In the JDK there is a method, initContext, for initializing the > state of a context switch. I've attached the code that we use > on the i386, and my first cut at the alpha code. Any and all > suggestions/patches are most welcome. :) After looking at the code more closely, it seems that jmp_buf is actually a struct osigcontext. There appears to be a bug in the sigmask save/restore since the sigset_t is overlayed onto sc_reserved[0-1] as you have noticed but the longjmp implementation (actually osigreturn() in the kernel) restores the mask from sc->sc_mask. I think that either the setjmp code should initialise sc->sc_mask with the first 32 bits of sc_reserved or setjmp/longjmp should both start using struct sigcontext. The main difficulty with that as far as I can see is that struct sigcontext is 82 words long and struct osigcontext is 81 words. 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. -- 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