[aarch64-port-dev ] RFR[xs]: 8245137: aarch64 ICache flush depends on enabling gnu extensions

Andrew Haley aph at redhat.com
Sun May 17 11:02:45 UTC 2020


On 5/16/20 6:39 PM, Kim Barrett wrote:
> Please review this small change to the aarch64 implementation of
> ICache::invalidate_word ICache::invalidate_range.  Rather than calling
> __clear_cache directly, they are changed to use __builtin___clear_cache.
> The direct call to __clear_cache requires either providing a
> declaration for that function or enabling gnu extensions.  Using the
> builtin requires neither.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8245137
>
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8245137/open.00/

Sure, it all ends up in libgcc's __aarch64_sync_cache_range anyway.

I've been a little wary of __builtin___clear_cache for a while, given
that we need to be certain exactly what it does in order to ensure the
correctness of HotSpot, but the code in libgcc is fine.

OK, thanks.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-runtime-dev mailing list