Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/c1/g1BarrierSetC1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ void G1BarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr, LIR_Opr new_v
__ logical_xor(xor_res, new_val, xor_res);
__ move(xor_res, xor_shift_res);
__ unsigned_shift_right(xor_shift_res,
LIR_OprFact::intConst(static_cast<jint>(HeapRegion::LogOfHRGrainBytes)),
LIR_OprFact::intConst(checked_cast<jint>(HeapRegion::LogOfHRGrainBytes)),
xor_shift_res,
LIR_Opr::illegalOpr());
} else {
__ logical_xor(addr, new_val, xor_res);
__ unsigned_shift_right(xor_res,
LIR_OprFact::intConst(static_cast<jint>(HeapRegion::LogOfHRGrainBytes)),
LIR_OprFact::intConst(checked_cast<jint>(HeapRegion::LogOfHRGrainBytes)),
xor_shift_res,
LIR_Opr::illegalOpr());
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void G1BarrierSetC2::post_barrier(GraphKit* kit,
// Should be able to do an unsigned compare of region_size instead of
// and extra shift. Do we have an unsigned compare??
// Node* region_size = __ ConI(1 << HeapRegion::LogOfHRGrainBytes);
Node* xor_res = __ URShiftX ( __ XorX( cast, __ CastPX(__ ctrl(), val)), __ ConI(static_cast<jint>(HeapRegion::LogOfHRGrainBytes)));
Node* xor_res = __ URShiftX ( __ XorX( cast, __ CastPX(__ ctrl(), val)), __ ConI(checked_cast<jint>(HeapRegion::LogOfHRGrainBytes)));

// if (xor_res == 0) same region so skip
__ if_then(xor_res, BoolTest::ne, zeroX, likely); {
Expand Down
7 changes: 4 additions & 3 deletions src/hotspot/share/gc/g1/g1Arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1HeapVerifier.hpp"
#include "gc/g1/heapRegion.hpp"
#include "gc/g1/heapRegionBounds.inline.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "gc/shared/cardTable.hpp"
#include "gc/shared/gcArguments.hpp"
Expand Down Expand Up @@ -132,9 +133,9 @@ void G1Arguments::initialize_card_set_configuration() {
assert(HeapRegion::LogOfHRGrainBytes != 0, "not initialized");
// Array of Cards card set container globals.
const uint LOG_M = 20;
uint region_size_log_mb = HeapRegion::LogOfHRGrainBytes > LOG_M
? HeapRegion::LogOfHRGrainBytes - LOG_M
: 0;
assert(log2i_exact(HeapRegionBounds::min_size()) == LOG_M, "inv");
assert(HeapRegion::LogOfHRGrainBytes >= LOG_M, "from the above");
uint region_size_log_mb = HeapRegion::LogOfHRGrainBytes - LOG_M;

if (FLAG_IS_DEFAULT(G1RemSetArrayOfCardsEntries)) {
uint max_cards_in_inline_ptr = G1CardSetConfiguration::max_cards_in_inline_ptr(HeapRegion::LogCardsPerRegion);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this change has anything to do with -Wconversion, but okay :)

Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ jobjectArray readConfiguration0(JNIEnv *env, JVMCI_TRAPS) {
assert(box.is_non_null(), "must have a box");
} else if (strcmp(vmField.typeString, "int") == 0 ||
strcmp(vmField.typeString, "jint") == 0 ||
strcmp(vmField.typeString, "uint") == 0 ||
strcmp(vmField.typeString, "uint32_t") == 0) {
BOXED_LONG(box, *(jint*) vmField.address);
assert(box.is_non_null(), "must have a box");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/jvmci/vmStructs_jvmci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@
#if INCLUDE_G1GC

#define VM_STRUCTS_JVMCI_G1GC(nonstatic_field, static_field) \
static_field(HeapRegion, LogOfHRGrainBytes, uint32_t)
static_field(HeapRegion, LogOfHRGrainBytes, uint)

#define VM_INT_CONSTANTS_JVMCI_G1GC(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \
declare_constant_with_value("G1CardTable::g1_young_gen", G1CardTable::g1_young_card_val()) \
Expand Down