RFR: JDK-8300783: Consolidate byteswap implementations [v8]

Justin King jcking at openjdk.org
Wed Jan 25 15:52:38 UTC 2023


On Wed, 25 Jan 2023 12:31:11 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update comment
>>   
>>   Signed-off-by: Justin King <jcking at google.com>
>
> CI run was fine wrt these changes.

@dholmes-ora I found more duplicate byteswap implementations. One in `src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp` and another in `utilities/moveBits.hpp`. `utilities/moveBits.hpp` is now just bit reversal, as none of the other functions are called anywhere. It should probably be renamed...

I also upgraded `utilities/moveBits.hpp` to use `__builtin_bitreverse` from Clang when available. I am not aware of MSVC or XLC having a bit reversal intrinsic.

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

PR: https://git.openjdk.org/jdk/pull/12114


More information about the hotspot-jfr-dev mailing list