[aarch64-port-dev ] RFR(S) 8248660: AArch64: JDK-Windows: Make _clear_cache and _nop portable

Anton Kozlov akozlov at azul.com
Tue Aug 18 17:53:06 UTC 2020


> On 8/3/20 11:29 PM, Monica Beckwith wrote:
>> Hi all, could I please get a review for the following webrev? I had previously sent this out for feedback and Kim had provided feedback on the usual way to handle such changes: https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2020-July/009272.html 
>> I have made the needful changes and ran them through JTREG for linux-aarch64, windows-aarch64, windows-x86-64, and linux-x86-64.
>> Webrev: http://cr.openjdk.java.net/~mbeckwit/8248660/webrev.01/ 
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8248660   

+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp
-      asm volatile ("nop");
+      NOP();

This code seems to be the only user of the new NOP() macro. This [1] and
another [2] place are the only occurrences of asm_bp. It looks like a debugging
aid that is unlikely to be used by anyone now. Is it possible to remove asm_bp
and the nop at all?

And nitpiking,

--- a/src/hotspot/cpu/aarch64/icache_aarch64.hpp
+++ b/src/hotspot/os_cpu/linux_aarch64/icache_linux_aarch64.hpp
-    __builtin___clear_cache((char *)addr, (char *)(addr + 3));
+    __builtin___clear_cache((char *)addr, (char *)(addr + 4));

an extra byte is invalidated, a typo?


[1] http://hg.openjdk.java.net/jdk/jdk/file/a51ce7f4ee54/src/hotspot/cpu/aarch64/assembler_aarch64.cpp#l33
[2] http://hg.openjdk.java.net/jdk/jdk/file/a51ce7f4ee54/src/hotspot/cpu/aarch64/assembler_aarch64.hpp#l611

More information about the aarch64-port-dev mailing list