FW: Porting OpenJDK 6 to Stratus OpenVOS on IA32

Barnes, Richard Richard.Barnes at stratus.com
Wed Sep 17 10:55:29 PDT 2008

Luckily, I had already found bytes_linux_i486.inline.hpp.  (By the way,
I meant to say hotspot/src/cpu/i486/vm/bytes_i486.hpp in my previous

I don't really know whether Project Zero is available for JDK6.



-----Original Message-----
From: Jonathan Springer [mailto:springer at reservoir.com] 
Sent: Monday, September 15, 2008 5:57 PM
To: Barnes, Richard
Cc: Volker Simonis; porters-dev at openjdk.java.net; Joe.Darcy at sun.com
Subject: Re: FW: Porting OpenJDK 6 to Stratus OpenVOS on IA32

Barnes, Richard wrote:
> Hi Volker,
> We found your blog at
> tml, which has enlightened us as to the "which kind of interpreter"
> question.  Our plan has been to convert all the source we can to our
> environment, but we will probably try to get the template interpreter
> working before the C++ one.  From our point of view, they probably
> present an equivalent degree of difficulty because each of the code
> sequences that load or store data will have to be examined unless the
> VM_LITTLE_ENDIAN flag and the functions in
> hotspot/src/cpu/x86/vm/bytes_x86.hpp manage to help us out.  If time
> runs out, we may just do the template interpreter.
> Thanks,
> Richard

Hotspot does hardcode some assumptions about x86 being little-endian,
like in bytes_linux_i486.inline.hpp.  swap_u2 needs to translate
between Java byte order (big-endian) and host platform order, so while
on sparc swap_u2 is a nop, on x86 it always swaps.  I ran into this
when porting the template interpreter a while back.

I think the template interpreter might be a little more work to make
big-endian due to the volume of code compared with the C++
interpreter, but not too bad, and of course much less work than a full
new-cpu port.  Sun uses the template compiler for their supported
platforms.  On the other hand, I think among the various non-Sun
porting projects, using the C++ interpreter is probably more common.
Also, Gary Benson has a nice zero-assembler port, which might be the
easiest of all.

For the compiler, you are right that C2 is the one you want if you
want best performance.


Jonathan Springer     |
Reservoir Labs, Inc.  |  http://www.reservoir.com/

More information about the porters-dev mailing list