RFR: 8308850: Change JVM options with small ranges from 64 to 32 bits, for globals.hpp
Coleen Phillimore
coleenp at openjdk.org
Mon Aug 7 14:55:30 UTC 2023
On Mon, 7 Aug 2023 14:43:26 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> The reason that this should be reverted is that to fix it, you have to fix all the platform code and that seems out of scope for fixing Wconversion warnings.
>
> Actually this counts bytecodes, so it could easily become 64 bit on 64 bit platforms.
This is complicated. BytecodeCounter::_counter_value is an int, and StopInterpreterAt compares to that in shared code, which is fine because it'll promote the former to intx. The cpu-specific code fetches the former as int and the latter as intx, except in one place so fixing either is going to be work. The one place that complains on x86 is
src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp:1865:12: warning: conversion from 'intx' {aka 'long int'} to 'int32_t' {aka 'int'} may change value [-Wconversion]
1865 | StopInterpreterAt,
| ^~~~~~~~~~~~~~~~~
__ cmp32(ExternalAddress((address) &BytecodeCounter::_counter_value),
StopInterpreterAt,
rscratch1);
We could just static_cast StopInterpreterAt to int here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15164#discussion_r1285995173
More information about the hotspot-dev
mailing list