RFR: 8329331: Intrinsify Unsafe::setMemory [v21]

Jorn Vernee jvernee at openjdk.org
Fri Apr 19 20:21:32 UTC 2024


On Fri, 19 Apr 2024 19:18:13 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:

>> src/hotspot/share/opto/runtime.cpp line 786:
>> 
>>> 784:   fields[argp++] = TypePtr::NOTNULL;    // dest
>>> 785:   fields[argp++] = TypeLong::LONG;      // size
>>> 786:   fields[argp++] = Type::HALF;          // size
>> 
>> Since the size is a `size_t`, I don't think this is correct on 32-bit platforms. I think here we want `TypeX_X`, and then add the extra `HALF` only on 64-bit platforms. Similar to what we do in `make_arraycopy_Type`: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/runtime.cpp#L799-L802
>> 
>> (Note that you will also have to adjust `argcnt` for this)
>
> I don't understand this well enough to be confident in the change.  Can you please verify that I've changed it properly?

Your latest version looks good to me.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18555#discussion_r1572909435


More information about the hotspot-compiler-dev mailing list