RFR: 8257815: Replace global log2 functions with efficient implementations [v6]
Claes Redestad
redestad at openjdk.java.net
Wed Dec 9 17:02:37 UTC 2020
On Wed, 9 Dec 2020 10:46:55 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> x->value
>
> src/hotspot/cpu/x86/vm_version_x86.cpp line 784:
>
>> 782: cpu_family(), _model, _stepping, os::cpu_microcode_revision());
>> 783: assert(res > 0, "not enough temporary space allocated");
>> 784: assert(exact_ilog2((uint64_t)CPU_MAX_FEATURE) + 1 == sizeof(_features_names) / sizeof(char*), "wrong size features_names");
>
> Cast of CPU_MAX_FEATURE isn't needed.
That's what I thought too, but GCC doesn't agree. It seems not even typed enums can be properly mapped to a template function.
Apart from this I think I've adressed all review comments.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1663
More information about the hotspot-dev
mailing list