RFR: 8309685: Fix -Wconversion warnings in assembler and register code
Coleen Phillimore
coleenp at openjdk.org
Tue Jun 13 14:40:45 UTC 2023
On Tue, 13 Jun 2023 14:15:00 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> The downside of this is it hides potentially real type mismatches from -Wconversion, once (if) that becomes
>> part of normal operations.
>
> Thanks for the suggested change. The sign extension for integral promotion was a problem. The second emit_int8 will still assert for the callers (there are still some) that pass a type that gets sign extended to int to emit_in8. I can see how many are left once the first function is added. Maybe it's possible to fix them all. We'll see.
src/hotspot/cpu/x86/assembler_x86.cpp|4421 col 12| error: no matching function for call to 'Assembler::emit_int8(Assembler::ComparisonPredicate&)'
|| 4421 | emit_int8(vcc);
|| | ~~~~~~~~~^~~~~
|| In file included from /scratch/cphillim/hg/21more-conversion/src/hotspot/cpu/x86/assembler_x86.cpp:26:
But I made ComparisonPredicate enum a uint8_t. Why didn't it match it?
// Comparison predicates for integral types & FP types when using SSE
enum ComparisonPredicate : uint8_t {
There are a bunch of these that don't like the templates.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14396#discussion_r1228238911
More information about the hotspot-dev
mailing list