AArch64 in JDK 9?

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jul 24 01:42:20 UTC 2014


Hi Andrew,

First, please, update JEP as Mikael suggested in his reply to "Please 
look at my JEP".

About your patch.

The patch was applied cleanly to jdk9/hs-comp/hotspot today. I generated 
webrev for easy review. So far I don't see problems except you need 
additional patch to jdk build system.

http://cr.openjdk.java.net/~kvn/8044552/webrev/

In globals.hpp at line 123 you replaced code instead of only adding new one:

- #ifdef TARGET_ARCH_ppc
- # include "c1_globals_ppc.hpp"
---
+ #ifdef TARGET_ARCH_aarch64
+ # include "c1_globals_aarch64.hpp"

I fixed it.

I ran these changes through JPRT (our build and test system). It failed 
to build:

src/os/linux/vm/os_linux.cpp: In static member function 'static void* 
os::dll_load(const char*, char*, int)':
src/os/linux/vm/os_linux.cpp:1951:6: error: 'EM_AARCH64' was not 
declared in this scope
      {EM_AARCH64,     EM_AARCH64, ELFCLASS64, ELFDATA2LSB, 
(char*)"AARCH64"},

It looks like GCC we use does not know about it: gcc version 4.8.2 (GCC)

I put that line under #ifdef and JPRT passed:

+#if defined(AARCH64)
+    {EM_AARCH64,     EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"}
+#endif

On 7/22/14 7:33 AM, Lindenmaier, Goetz wrote:
> Hi Andrew,
>
> I had a look at your change.
> It's really much less than what we adapted!
> All the effort with the staging directory would be overkill I guess.

I agree that these Hotspot shared changes are surprisingly small. But 
you need also changes in JDK build system and remaining hotspot patches. 
We still need the staging directory to collect all changes as separate 
reviewed changesets and test them.

Thanks,
Vladimir

>
> I tried to patch the change to hs-rt.
> Unfortunately, my change cleaning up the shared includes of cpu files
> was just pushed, so your change does not apply cleanly any more.
> But in the end this should even more reduce the size of your patch.
>
> I would add the includes in alphabetic sorting, i.e., before TARGET_ARCH_arm.
> Same for lists of defines:  c1_LIR.hpp:
> +#if defined(SPARC) || defined(ARM) || defined(PPC) || defined(AARCH64)
> I would put AARCH64 before ARM.
> We also put AIX before BSD -- PPC was there already.
> Saying that, why don't you reuse the includes etc. for ARM?  In the end, only
> the strings in os_linux must differ, and they could depend on ARM64 as we do
> it for PPC.
>
> In c1_LIR.c|hpp, I would use AARCH64 in defines instead of TARGET_ARCH_aarch64.
>
> Best regards,
>    Goetz.
>
>
>
> -----Original Message-----
> From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On Behalf Of Andrew Haley
> Sent: Dienstag, 22. Juli 2014 12:08
> To: Vladimir Kozlov; Volker Simonis
> Cc: hotspot-dev Source Developers
> Subject: Re: AArch64 in JDK 9?
>
> I have prepared a diff that is the patch needed in the shared parts
> of HotSpot for OpenJDK 9.
>
> It is at http://cr.openjdk.java.net/~aph/aarch64.1
>
> If it would help to have a webrev I will do that, but it wasn't
> clear how it should be done.
>
> I believe that there are no non-trivial changes to shared code which
> are not guarded by TARGET_ARCH_aarch64, therefore it is unlikekly that
> any other target will be affected.  There are a couple of trivial
> white space changes which I intend to remove; please ignore these.
>
> I hope that this will help you estimate the work required on Oracle's
> side to integrate this port.
>
> Thanks,
> Andrew.
>


More information about the hotspot-dev mailing list