Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 12:44:03 +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.0004241232400.62105-100000@salmon.nlsystems.com>
In-Reply-To: <Pine.OSF.4.21.0004222217380.16038-200000@fly.HiWAAY.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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