FW: Porting OpenJDK 6 to Stratus OpenVOS on IA32
Jonathan Springer
springer at reservoir.com
Mon Sep 15 14:57:12 PDT 2008
Barnes, Richard wrote:
> Hi Volker,
>
> We found your blog at
> http://weblogs.java.net/blog/simonis/archive/2007/11/template_vs_cin_1.h
> 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 both
> 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
--
Jonathan Springer |
Reservoir Labs, Inc. | http://www.reservoir.com/
More information about the porters-dev
mailing list