Skip to content

Commit

Permalink
Avoid using ULL
Browse files Browse the repository at this point in the history
  • Loading branch information
cl4es committed Nov 9, 2020
1 parent fde1fc5 commit 38c6056
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/opto/regmask.hpp
Expand Up @@ -143,7 +143,7 @@ class RegMask {
assert(reg < CHUNK_SIZE, "");

unsigned r = (unsigned)reg;
return _RM_UP[r >> _LogWordBits] & (1ULL <<(r & (_WordBits - 1U)));
return _RM_UP[r >> _LogWordBits] & (uintptr_t(1) <<(r & (_WordBits - 1U)));
}

// The last bit in the register mask indicates that the mask should repeat
Expand Down Expand Up @@ -285,15 +285,15 @@ class RegMask {
unsigned index = r >> _LogWordBits;
if (index > _hwm) _hwm = index;
if (index < _lwm) _lwm = index;
_RM_UP[index] |= (1ULL<<(r & (_WordBits - 1U)));
_RM_UP[index] |= (uintptr_t(1) << (r & (_WordBits - 1U)));
assert(valid_watermarks(), "post-condition");
}

// Remove register from mask
void Remove(OptoReg::Name reg) {
assert(reg < CHUNK_SIZE, "");
unsigned r = (unsigned)reg;
_RM_UP[r >> _LogWordBits] &= ~(1ULL << (r & (_WordBits-1U)));
_RM_UP[r >> _LogWordBits] &= ~(uintptr_t(1) << (r & (_WordBits-1U)));
}

// OR 'rm' into 'this'
Expand Down

0 comments on commit 38c6056

Please sign in to comment.