RFR: 8248817: Windows: Improving common cross-platform code

Kim Barrett kim.barrett at oracle.com
Thu Jul 16 18:20:26 UTC 2020

> On Jul 16, 2020, at 11:39 AM, Ludovic Henry <luhenry at microsoft.com> wrote:
> Hi David,
>> I'm not very good with templates so I've asked Kim Barrett if he can
>> take a look at this aspect.
> Sounds good, looking forward for his review.

I think retaining the "stub" nomenclature is misleading; "stub" has a
somewhat specific meaning in low-level HotSpot code.  "intrinsic"
might be a better choice.

I'm guessing that as a followup, as part of the aarch64 port, these
will probably be changed to dispatch on the memory order to choose the
appropriately ordered intrinsics.  But what's being proposed seems
sufficient for now.

I noticed that HotSpot's cmpxchg argument order is different than the
MSVC intrinsic's argument order.  That might be worthy of a comment.

> I'm updating the webrev at http://cr.openjdk.java.net/~burban/luhenry/8248817-atomics/webrev.03 with the proper realignement of the parameters.

That parameter alignment problem doesn’t seem to have been fixed.

Other than these minor nits, this change looks good to me.

Nice to see the stub functions go away.

More information about the hotspot-runtime-dev mailing list