This page covers my work to fix the OpenJDK port for the ARM, that has been broken since May, 2010. This work initially requires fixing two bugs, and then adding some other patches after that works that are Thumb2 specific. The two bug reports are: PR 323 PR 484
Once that works, I plan to integrate the RTC Thumb2 JIT enhancements. These are patches which were not integrated into icedtea yet, because they show some regressions in the test suite. So after merging, there will likely be some bug fixing required.
Support for the ARM assembler was disabled due to other improvements to IcedTea and OpenJDK by commenting out the HOTSPOT_ASM flag in openjdk/hotspot/make/linux/makefiles/zeroshark.make.
+#XXX disabled until it has the updated frame anchor code (PR icedteopenjdk.orig/hotspot/323) +#XXX and the updated calling convention for deopt (PR icedteopenjdk.orig/hotspot/484) +#CFLAGS += -DHOTSPOT_ASMHere's a nice summary on what needs to be updated for pr323 at
I have a patch for pr323 that is now under more testing. This fixes the calling convention that got broken in the ARM assembler. The change added a Frame Pointer to the Thread data structure, which is now used where the Stack Pointer used to be. There are two main files this change effected are cppInterpreter_arm.S, and thumb2.cpp. There is also an initial patch for pr484 done by xerces merged in, but is currently untested. This patch doesn't effect any of the other changes.
Where the old code sets the Stack Pointer to zero, this now sets the Frame Pointer to zero instead. In the case the Stack Pointer is being set to a non-zero value, the Frame Pointer gets set to that value, and the Stack Pointer now points to the top of the Zero stack. There is a bit of a weird order this must be done in though. First the Stack Pointer has to be set to zero before setting the Frame Pointer. Then the Stack Pointer can be set to the top of the Zero stack.
Currently with this patch, the ARM assembler appears to work, while more debugging needs to be done to thumb2.cpp, which contains the thumb2 JIT. The Thumb2 JIT isn't used with Shark, so that combination may work now.
However this post makes it sound like there is still a problem which will have to be looked into. Here's another post on the new calling convention, and why HOTSPOT_ASM was commented out.
The RTC patches are explained in detail in this message by the author. Here's the 4 patches:
I found a good ARM assembler manual, which was very useful as my ARM assembler is more than rusty, and dates from the original Thumb1 days anyway.
The sources used are the unpatched versions as used by Icedtea, so all the patches apply cleanly. All source code has been imported into a temporary bzr repository for development of the ARM specific patches. I also grabbed the drop *.zip files, stuck them in a stable place, and then used the config options to use those, instead of downloading new ones after a make distclean
When configuring, I discovered that not using the --with-openjdk option to configure builds java twice, wasting critical build time, but also can cause problems with the bootstrap directory not getting setup correctly, so the build fails.
| icedtea6 | ||
|---|---|---|
| Hotspot | 8 Errors | 2 Failures |
| JDK | aborted | aborted |
| Langtools | 10 Errors | No Failures |
Test results using the ARM assembler interpreter
|
|
|
|
|