ZUtils::fill uses the C++ Standard Library function std::fill_n, from <algorithm>. Much of the Standard Library, including <algorithm>, is not approved for use in HotSpot code. This is currently the only such use outside of adlc.
It could be using something from the HotSpot Copy class, except there isn't presently an appropriate function there. Copy::fill_to_words takes a juint value, which could clip the upper part of the value passed to ZUtils::fill. The current API of Copy::fill_to_words is arguably a mistake.
The simplest thing to do would be to change it to the simple and obvious for-loop.
It could be using something from the HotSpot Copy class, except there isn't presently an appropriate function there. Copy::fill_to_words takes a juint value, which could clip the upper part of the value passed to ZUtils::fill. The current API of Copy::fill_to_words is arguably a mistake.
The simplest thing to do would be to change it to the simple and obvious for-loop.
- links to
-
Commit(master) openjdk/jdk/22845a77
-
Review(master) openjdk/jdk/22667