[EXTERNAL] Re: OpenJDK extension to AArch64 and Windows

Bernhard Urban-Forster beurba at microsoft.com
Thu Jun 25 11:46:19 UTC 2020


Thank you for your review Andrew.

> Rather than keep bouncing this back and forth until I'm statisfied,
> which would be boring for both of us, if you like I'll replace all of 
> the bare "long" and "unsigned long" with the appropriate 
> portable types. Do you want me to do that?

This would be great!  Once I have your updated patch, I can test it on win+aarch64.


Thank you,
-Bernhard

-----Original Message-----
From: Andrew Haley <aph at redhat.com> 
Sent: Thursday, 25 June 2020 10:26
To: Monica Beckwith <Monica.Beckwith at microsoft.com>; hotspot-runtime-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net
Cc: openjdk-aarch64 <openjdk-aarch64 at microsoft.com>
Subject: [EXTERNAL] Re: OpenJDK extension to AArch64 and Windows

On 24/06/2020 17:40, Monica Beckwith wrote:
> Hello OpenJDK community,
>
> As the project lead here @Microsoft, I am pleased to share that we 
> have been working towards a Windows addition to the OpenJDK AArch64 
> port. We are very thankful to all that have contributed to the
> Linux+aarch64 and Windows+x86-64. Both these codebases came to our
> rescue on numerous occasions.
>
> Support status: We have successfully ported C2 and can build the 
> server release (cross-compiled environment)

> Test coverage: C2 + ParallelGC (No AOT, JVMCI, ZGC, ShenandoahGC, 
> G1GC) Tests and benchmarks covered [1]: JTReg [2], JCStress, jmh-jdk-microbenchmarks, SPEC SERT, SPECJBB2015 [3], SPEC JVM2008, Scimark2, SPEC JBB2005.
> Umbrella Bug ID: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs
> .openjdk.java.net%2Fbrowse%2FJDK-8248238&data=02%7C01%7Cbeurba%40m
> icrosoft.com%7Cfa1bff53ed8e4341186308d818e172f9%7C72f988bf86f141af91ab
> 2d7cd011db47%7C1%7C0%7C637286703863799643&sdata=o%2FRsqlEGUcInzggB
> MdjB0Ixi0cwKPUzaTyfJuUPEazU%3D&reserved=0
> Webrevs:
> `Webrev P1`: 
> https://nam06.safelinks.protection.outlook.com/?url=http:%2F%2Fcr.open
> jdk.java.net%2F~burban%2Fwinarm64_p1_llp64%2F&data=02%7C01%7Cbeurb
> a%40microsoft.com%7Cfa1bff53ed8e4341186308d818e172f9%7C72f988bf86f141a
> f91ab2d7cd011db47%7C1%7C0%7C637286703863799643&sdata=ruv1ypJO74RlD
> tMlfwK%2BBpqn5AtFi4sG90bDYmss5Go%3D&reserved=0  &

This looks basically OK, but the use of uint64_t doesn't read well in aarch64.ad. (For what it's worth, the type used internally in HotSpot for $$constant is actually intptr_t.)

3130   enc_class aarch64_enc_mov_imm(iRegL dst, immL src) %{
3131     C2_MacroAssembler _masm(&cbuf);
3132     Register dst_reg = as_Register($dst$$reg);
3133     uint64_t con = (uint64_t)$src$$constant;

Here, the type of the register is iRegL, so con could be a julong, not a uint64_t.

In general the easiest way to fix aarch64.ad is probably

long -> jlong
unsigned long -> julong
u_int64_t -> uint64_t

But not always everywhere. Here, the arg is an address offset:

-void Assembler::adrp(Register reg1, const Address &dest, unsigned long &byte_offset) {
+void Assembler::adrp(Register reg1, const Address &dest, uint64_t 
+&byte_offset) {
   ShouldNotReachHere();
 }

uintptr_t would do here.

The coments in aarch64.ad like this one:

-  format %{ "mov $dst, $src\t# long" %}
+  format %{ "mov $dst, $src\t# int64_t" %}

refer to a *Java type*. It shouldn't be changed.

Rather than keep bouncing this back and forth until I'm statisfied, which would be boring for both of us, if you like I'll replace all of the bare "long" and "unsigned long" with the appropriate portable types. Do you want me to do that?

Thanks.

--
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2F&data=02%7C01%7Cbeurba%40microsoft.com%7Cfa1bff53ed8e4341186308d818e172f9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637286703863799643&sdata=jTj6sBwPYxLMvRdywQL4d4zudsa59BU6TyAk2C1TFfg%3D&reserved=0>
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fkeybase.io%2Fandrewhaley&data=02%7C01%7Cbeurba%40microsoft.com%7Cfa1bff53ed8e4341186308d818e172f9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637286703863799643&sdata=EshTj31BKzA%2FYw8LvHQ2cuvW9gitwQfBhFXoPMuuCyk%3D&reserved=0
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-runtime-dev mailing list