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

Justin King jcking at openjdk.org
Fri Jan 27 17:01:00 UTC 2023


On Fri, 27 Jan 2023 02:27:54 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix test
>>   
>>   Signed-off-by: Justin King <jcking at google.com>
>
> test/hotspot/gtest/opto/test_moveBits.cpp line 42:
> 
>> 40:   ASSERT_EQ(reverse_bits((T)-1), (T)-1);
>> 41:   ASSERT_EQ(byteswap<T>((T)0), (T)0);
>> 42:   ASSERT_EQ(byteswap<T>((T)-1), (T)-1);
> 
> This isn't testing moveBits any more so doesn't belong here.

Moved test_moveBits.cpp to be in utilities and split out byteswap tests into their own file.

> test/hotspot/gtest/opto/test_moveBits.cpp line 58:
> 
>> 56:       ASSERT_EQ((T)~reverse_bits((T)~mask), revm1|revm2) << STUFF;
>> 57:       ASSERT_EQ(byteswap<T>(mask), rbym1|rbym2) << STUFF;
>> 58:       ASSERT_EQ((T)~byteswap<T>((T)~mask), rbym1|rbym2) << STUFF;
> 
> Ditto - doesn't belong here.

Done.

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

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


More information about the hotspot-jfr-dev mailing list