[aarch64-port-dev ] RFR (M) 8228400: Remove built-in AArch64 simulator

Andrew Dinn adinn at redhat.com
Thu Jul 25 12:22:47 UTC 2019


On 24/07/2019 15:40, Aleksey Shipilev wrote:
> RFE:
>   https://bugs.openjdk.java.net/browse/JDK-8228400
> 
> There is a lot of code in AArch64 port that hooks up to the built-in simulator. That simulator was
> used to bootstrap/develop the port when hardware was not available. This simulator is not needed
> now, and we should remove it to unclutter the code.
> 
> Removal webrev:
>   https://cr.openjdk.java.net/~shade/8228400/webrev.02/
> 
> The only thing that feels risky for me is removal of call_VM_leaf_base1 in
> templateTable_aarch64.cpp, please take a thorough look.

I think this is right (although it is a long time ago since I looked at
it). On AArch64 there is no need to consider the num_args argument so it
can be omitted and default to 0. The same applies on x86_64 -- num_args
is only relevant on x86_32.

> I am planning to backport it to 11u and 8u-aarch64 too.
> 
> Testing: linux-aarch64-fastdebug tier1, tier2; linux-x86_64-fastdebug builds; jdk-submit (running)
Well, this all looks very good and could go in as is. However, I think
you may have missed some opportunities for removal:

1) File cpustate_aarch64.hpp exists primarily to declare a class
CPUState. This was needed to save/restore AArch64 register state on exit
from/re-entry into the simulator. I don't think anything else ought to
be using class CPUState or any of the other types it defines.

Was there any good reason not simply to delete this file? (if so perhaps
whatever is keeping that file alive needs to be relocated to a home that
corresponds to the x86 file layout).

2) File decode_aarch64.hpp contains almost entirely redundant stuff. I
believe the only code that is referenced from another file is the suite
of various pickbit* functions and their underlying mask* functions, the
client being code in file immediate_aarch64.cpp. All the enums are
redundant. So, I think this needs fixing by removing everything but the
pickbit* and mask* fns. It would probably be better to move these to
file immediate_aarch64.hpp and delete file decode_aarch64.hpp.

regards,


Andrew Dinn
-----------



More information about the aarch64-port-dev mailing list