diff --git a/src/hotspot/cpu/s390/assembler_s390.hpp b/src/hotspot/cpu/s390/assembler_s390.hpp index ab09460bd86..c98c100a068 100644 --- a/src/hotspot/cpu/s390/assembler_s390.hpp +++ b/src/hotspot/cpu/s390/assembler_s390.hpp @@ -56,24 +56,23 @@ class Immediate { } // Test if x is within signed immediate range for nbits. - static bool is_uimm(int64_t x, unsigned int nbits) { + static bool is_uimm(uint64_t x, unsigned int nbits) { // nbits == 0 --> false // nbits >= 64 --> true assert(1 <= nbits && nbits < 64, "don't call, use statically known result"); - const uint64_t xu = (unsigned long)x; const uint64_t maxplus1 = 1UL << nbits; - return xu < maxplus1; // Unsigned comparison. Negative inputs appear to be very large. + return x < maxplus1; // Unsigned comparison. Negative inputs appear to be very large. } - static bool is_uimm32(int64_t x) { + static bool is_uimm32(uint64_t x) { return is_uimm(x, 32); } - static bool is_uimm16(int64_t x) { + static bool is_uimm16(uint64_t x) { return is_uimm(x, 16); } - static bool is_uimm12(int64_t x) { + static bool is_uimm12(uint64_t x) { return is_uimm(x, 12); } - static bool is_uimm8(int64_t x) { + static bool is_uimm8(uint64_t x) { return is_uimm(x, 8); } };