RFR: 8309685: Fix -Wconversion warnings in assembler and register code

Andrew Haley aph at openjdk.org
Wed Jun 21 12:41:04 UTC 2023


On Wed, 21 Jun 2023 12:00:07 GMT, Coleen Phillimore <coleenp 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.

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.

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

Marked as reviewed by aph (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14584#pullrequestreview-1490635626
PR Review Comment: https://git.openjdk.org/jdk/pull/14584#discussion_r1236933205


More information about the hotspot-dev mailing list