RFR: 8261027: AArch64: Support for LSE atomics C++ HotSpot code [v2]
Andrew Haley
aph at openjdk.java.net
Tue Feb 9 17:35:38 UTC 2021
On Tue, 9 Feb 2021 17:05:01 GMT, Volker Simonis <simonis at openjdk.org> wrote:
> But nevertheless I think implementing the default versions in native assembly isn't really simple and putting that Linux/gcc specific assembly code into the generic aarch64 directory `src/hotspot/cpu/aarch64` will break other aarch64 platforms like Windows and Mac.
OK. We can do Windows another way, and I will move the assembler stubs to Linux.
> Why don't you leave the default implementation as simple wrappers for the C++ compiler intrinsics
Because the atomic stubs use a non-standard calling convention that only clobbers a few registers, so they can't be written in C++ because we can't control which registers the C++ compiler uses. If we were to use the native calling convention to call stubs we'd need to save and restore a ton of registers somehow - and not just the integer registers but also the vectors. It wouldn't be any simpler.
I do intend to provide lower-overhead versions of the Atomic functions in a later patch. This one does the LSE/non-LSE split without changing anything else.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2434
More information about the hotspot-dev
mailing list