RFR: Add support for ARMv6 to ARM JIT

Edward Nevill edward.nevill at gmail.com
Wed Jan 21 17:06:33 UTC 2015


Hi,

The following patch adds support for ARMv6 to the ARM JIT (previously known as the Thumb2 JIT).

http://openjdk.linaro.org/arm32jit/patches/6046.patch

The following ARM architectures are now supported

ARMv6 - Vanilla ARMv6 as on Raspberry PI (No Thumb2, No LDREXD/STREXD)
ARMv6K - ARMv6 with MP support (No Thumb2, but has LDREXD/STREXD)
ARMV6T2 - ARMv6 with Thumb2 and LDREXD/STREXD
ARMV7 - all variants supported
ARMV8 - all variants supported (in AARCH32 mode)

Note, because of the lack of properly working double/long atomic primitives on vanilla ARMv6 only non MP is supported on this. The Raspberry PI is single core so this is not a problem, it just uses LDM/STM or LDRD/STRD.

I have based the patches on the icedtea7 tree at http://icedtea.classpath.org/hg/icedtea7-forest/hotspot Is this the correct location for the tip of the icedtea7 development?

Because of the size of the changes I have introduced a new file arm32JIT.cpp rather than modifying the existing thumb2.cpp. This is switched on a symbol ARM32JIT. By default it will continue to build the Thumb2 JIT. To change it to build the ARM32 JIT by default add -DARM32JIT to CFLAGS in zeroshark.make as in the following patch.

http://openjdk.linaro.org/arm32jit/patches/6047.patch

I have put an image at

http://openjdk.linaro.org/arm32jit/images/arm32jit.tgz

I would be grateful if people could try out this image, especially on Raspberry PI.

Some influential environment variables are

T2_COMPILE_ARM

Force it to compile for ARM32. By default it still compiles for Thumb2 on Thumb2 capable cores, setting this variable will force it to compile for ARM.

T2_PRINT_STATISTICS

Print some compilation statistics as it compiles

T2_PRINT_COMPILATION (or -XX:+PrintCompilation)

Print the name of each method as it compiles

T2_PRINT_DISASS (or -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly)

Disassemble each method as it compiles.

I have tested the original Thumb2 JIT and the new ARM v6 JIT with hotspot and langtools tests from JTreg. Here are the results I get:-

Original Thumb2 JIT

Hotspot: Test results: passed: 265; failed: 13; error: 7
Langtools: Test results: passed: 1,957; failed: 1; error: 9

ARMv6 JIT

Hotspot: Test results: passed: 266; failed: 8; error: 11
Langtools: Test results: passed: 1,957; failed: 1; error: 9

All comments welcome!
Ed.




More information about the distro-pkg-dev mailing list