ARM have announced the ARMv8. The most interesting thing about it is
the "A64" instruction set architecture, which makes the new ARM a full
64-bit processor. They haven't extended the 32-bit ISA but created an
all-new one: in many ways the 32-bit and 64-bit versions are quite
different. So, to take advantage of the A64, we're going to need new
compilers and Java virtual machines. At Red Hat we've decided to do a
port of OpenJDK to the A64. This will be completely free software,
and we will invite others to participate.
From a compiler writer's point of view, the A64 looks nicer than the
older ISA because it has twice as many registers: 32 rather than 16.
This makes it a much better fit for high-level languages like Java.
The main motivation, though, is the huge memory space that 64-bit
addressing allows.
So, we're writing a port of OpenJDK for the A64. We're doing this
because the current OpenJDK ARM situation is rather unsatisfactory,
and we want to do better with A64.
There are two versions of HotSpot, the VM that OpenJDK uses, for the
current (32-bit) ARM. The one written and owned by Oracle is
proprietary, and the other (written for ARM) is free. The proprietary
VM performs better than the free one. The latter uses a lightweight
small-footprint just-in-time compiler that can't compete with the
might of Oracle's JIT. We really don't want this situation for A64,
so we're writing a port that will be entirely free software. We'll
submit this as an OpenJDK project, and we hope that others will join
us in the work.
Rather than waiting for real hardware we decided to write a simple CPU
simulator, which we're using for development testing. We're pretty
confident that it models the architecture as described, but there will
inevitably be some gotchas that we discover when we run on real
hardware for the first time.
Today the template interpreter, the first stage of any HotSpot port,
is almost done. We hope to finish it by Christmas, and at that point
we hope to release it for preliminary public access. We have a
non-disclosure agreement that doesn't allow us to release anything
today, but we hope that it will be lifted soon.
The interpreter-only release will be the first complete implementation
of Java for the A64, but it won't be very fast! Our next job will be to
write the just-in-time compilers. After some thought we've decided to
write C1 (the client JIT) first and then proceed to C2 (the server
JIT). We weren't sure whether to write C1 at all: this is fairly
high-end hardware, and we think its main use will be in servers, so
it's not clear that anyone will need C1. However, there are two
reasons for doing it: firstly, we are new to porting HotSpot, and C1
is much easier to do. In writing C1 we'll learn a lot that we can
apply to writing C2. Secondly, we want tiered compilation, which runs
C1 early and then later recompiles hot methods with C2.
This is an exciting project to work on. To the best of our knowledge
there hasn't been a full port of HotSpot done as an open project since
OpenJDK was freed five years ago. It's a little scary, but we're
confident that this is going to work.
Comments and questions are welcome. We haven't set up a mailing list yet,
so please direct them to distro-pkg-dev@openjdk.java.net .