RFR: 8256633: Fix product build on Windows+Arm64
Aleksey Shipilev
shade at openjdk.java.net
Fri Nov 20 10:17:06 UTC 2020
On Fri, 20 Nov 2020 10:11:09 GMT, Bernhard Urban-Forster <burban at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/assembler_aarch64.hpp line 509:
>>
>>> 507: if (_ext.shift() > 0) {
>>> 508: assert(_ext.shift() == (int)size, "bad shift");
>>> 509: }
>>
>> D'oh. So this is semantically the same as:
>>
>> assert(_ext.shift() <= 0 || _ext.shift() == (int)size, "bad shift");
>>
>> ...or, if we expect shift to be non-negative:
>>
>> assert(_ext.shift() == 0 || _ext.shift() == (int)size, "bad shift");
>
> Indeed. Are you suggesting to change it? I usually try to avoid changing code style when doing a fix of such a nature.
I feels odd to have empty method body when asserts are disabled. So yes, I suggest to subsume the check into the assert itself.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1312
More information about the hotspot-compiler-dev
mailing list