Sparc assembler help (jdk13 port)

Greg Lewis glewis at
Tue Feb 17 22:46:26 PST 2004

On Tue, Feb 17, 2004 at 08:51:38PM -0800, John-Mark Gurney wrote:
> Greg Lewis wrote this message on Mon, Feb 16, 2004 at 23:30 -0700:
> > I'm trying to get the jdk13 port running on sparc64.  Unfortunately JDK
> > 1.3.1 runs on the Sparc in 32 bit mode under Solaris, so there were a
> > number of 32 bit vs. 64 bit problems.  I think I've got most of the initial
> > stage of the build working correctly, however I'm running into some trouble
> > with the assembler code which 'translates the "Java" calling convention
> > into the "C" * calling convention used in native methods'.  Since the code
> > was written for 32 bit mode it assumes a pointer can be passed in a single
> > 32 bit register, etc.  Unfortunately my knowledge of assembler is very
> > limited and in particular I know nothing about Sparc assembler.
> > 
> > I'd love to hear from someone who knows some Sparc assembler and in
> > particular how FreeBSD calls functions (i.e. how the arguments are
> > placed into registers or on the stack).  Short of this, some pointers
> > to the right information may eventually yield some results.
> I have some experience in assembly, and can try to answer your questions..

Thanks to you and Ken for replying :).

> Sparcs put the arguments into the o? registers (upto to 8)...

And if we have more than 8 arguments they go on the stack?

> You might want to check out, and look at the SPARCv9 arch
> manual...  check out chapter 5 which talks about registers...

Ok, I've had a little look.  Unfortunately much of it is going over my head
but it is making some sense.

> > The code itself is quite short, however I can't post it due to the way Sun
> > licenses their Java source code.  If you've compiled any of the jdk* ports
> > though, then you've agreed to the appropriate license (Sun Community Source
> > License).
> I did d/l the sun java code a while back.. j2sdk-1_3_1-src.tar.gz..
> guess it wasn't as far back as I thought.. :)

Well, its a while back, but like I said, 1.3.1 is a whole lot easier than
1.4.2, so I'm trying that first.

I'll send followup email to you and Ken off list.  Thanks!

Greg Lewis                          Email   : glewis at
Eyes Beyond                         Web     :
Information Technology              FreeBSD : glewis at

More information about the freebsd-sparc64 mailing list