RFR: 8309685: Fix -Wconversion warnings in assembler and register code
Coleen Phillimore
coleenp at openjdk.org
Wed Jun 21 13:32:09 UTC 2023
On Wed, 21 Jun 2023 12:38:17 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> This is essentially the same as PR https://github.com/openjdk/jdk/pull/14396 only without the asm/assembler.hpp changes for emit_int8, etc. The casts and type changes here resolve header file -Wconversion warnings but not the 941 in assembler_x86.cpp.
>> Tested with tier 1-7, and tier1 on Oracle supported platforms.
>
> LGTM.
Thanks for reviewing and your attention @theRealAph.
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 2041:
>
>> 2039: emit_int8((uint8_t)0x65); // gs:
>> 2040: emit_int8((uint8_t)0x90);
>> 2041: }
>
> Maybe there us a better way to do this with a template `emit_int8()` function, but maybe not now.
I fixed these casts as an alternative to the emit_int8 templates, so left them in this patch because they're more correct than what was there. The emit_intXX functions need special treatment that I don't know how to fix right now.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14584#issuecomment-1600799638
PR Review Comment: https://git.openjdk.org/jdk/pull/14584#discussion_r1236969081
More information about the hotspot-dev
mailing list