RFR: 8186670: Implement _onSpinWait() intrinsic for AArch64

Andrew Haley aph at openjdk.java.net
Sat Sep 18 09:40:45 UTC 2021


On Fri, 17 Sep 2021 19:58:43 GMT, Evgeny Astigeevich <github.com+42899633+eastig at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 2989:
>> 
>>> 2987:   switch (VM_Version::pause_impl_desc().inst()) {
>>> 2988:     case NOP:
>>> 2989:       for (unsigned int i = 1; i < VM_Version::pause_impl_desc().inst_count(); ++i) {
>> 
>> Shouldn't these loops be indexed from 0?
>
> Good catch. It is a copy-paste error.
> Is there any method to test C1 generated assembly code?

You could do it the same way as hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java, i.e. spawn a subtask and parse the output dump. It's very fiddly, though.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5562


More information about the hotspot-dev mailing list