|
| 1 | +diff --git a/hotspot/src/share/vm/code/compiledIC.cpp b/hotspot/src/share/vm/code/compiledIC.cpp |
| 2 | +index 63821c06..054b86d0 100644 |
| 3 | +--- a/hotspot/src/share/vm/code/compiledIC.cpp |
| 4 | ++++ b/hotspot/src/share/vm/code/compiledIC.cpp |
| 5 | +@@ -222,7 +222,7 @@ bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecod |
| 6 | + assert(bytecode == Bytecodes::_invokeinterface, ""); |
| 7 | + int itable_index = call_info->itable_index(); |
| 8 | + entry = VtableStubs::find_itable_stub(itable_index); |
| 9 | +- if (entry == false) { |
| 10 | ++ if (entry == nullptr) { |
| 11 | + return false; |
| 12 | + } |
| 13 | + #ifdef ASSERT |
| 14 | +diff --git a/hotspot/src/share/vm/code/dependencies.hpp b/hotspot/src/share/vm/code/dependencies.hpp |
| 15 | +index 0392d4e3..9d88d166 100644 |
| 16 | +--- a/hotspot/src/share/vm/code/dependencies.hpp |
| 17 | ++++ b/hotspot/src/share/vm/code/dependencies.hpp |
| 18 | +@@ -170,7 +170,7 @@ class Dependencies: public ResourceObj { |
| 19 | + LG2_TYPE_LIMIT = 4, // assert(TYPE_LIMIT <= (1<<LG2_TYPE_LIMIT)) |
| 20 | + |
| 21 | + // handy categorizations of dependency types: |
| 22 | +- all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE), |
| 23 | ++ all_types = ((1 << TYPE_LIMIT) - 1) & ((~0u)<< FIRST_TYPE), |
| 24 | + |
| 25 | + non_klass_types = (1 << call_site_target_value), |
| 26 | + klass_types = all_types & ~non_klass_types, |
| 27 | +diff --git a/hotspot/src/share/vm/oops/cpCache.hpp b/hotspot/src/share/vm/oops/cpCache.hpp |
| 28 | +index a4a6c3f3..e7cd01d2 100644 |
| 29 | +--- a/hotspot/src/share/vm/oops/cpCache.hpp |
| 30 | ++++ b/hotspot/src/share/vm/oops/cpCache.hpp |
| 31 | +@@ -192,7 +192,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC { |
| 32 | + field_index_mask = right_n_bits(field_index_bits), |
| 33 | + parameter_size_bits = 8, // subset of field_index_mask, range is 0..255 |
| 34 | + parameter_size_mask = right_n_bits(parameter_size_bits), |
| 35 | +- option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask)) |
| 36 | ++ option_bits_mask = ~(((~0u)<< tos_state_shift) | (field_index_mask | parameter_size_mask)) |
| 37 | + }; |
| 38 | + |
| 39 | + // specific bit definitions for the indices field: |
| 40 | +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h |
| 41 | +index f1a1f73e..c3330a48 100644 |
| 42 | +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h |
| 43 | ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h |
| 44 | +@@ -223,7 +223,7 @@ enum { |
| 45 | + AO_HAVE_FIELD_FLAGS_HI = 1<<10, |
| 46 | + AO_HAVE_METHOD_FLAGS_HI = 1<<11, |
| 47 | + AO_HAVE_CODE_FLAGS_HI = 1<<12, |
| 48 | +- AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use. |
| 49 | ++ AO_UNUSED_MBZ = (~0u)<<13, // options bits reserved for future use. |
| 50 | + |
| 51 | + #define ARCHIVE_BIT_DO(F) \ |
| 52 | + F(AO_HAVE_SPECIAL_FORMATS) \ |
| 53 | +diff --git a/jdk/src/share/native/sun/awt/image/jpeg/jdhuff.c b/jdk/src/share/native/sun/awt/image/jpeg/jdhuff.c |
| 54 | +index 1d0f8d56..25b67ca1 100644 |
| 55 | +--- a/jdk/src/share/native/sun/awt/image/jpeg/jdhuff.c |
| 56 | ++++ b/jdk/src/share/native/sun/awt/image/jpeg/jdhuff.c |
| 57 | +@@ -444,7 +444,7 @@ jpeg_huff_decode (bitread_working_state * state, |
| 58 | + |
| 59 | + #ifdef AVOID_TABLES |
| 60 | + |
| 61 | +-#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) |
| 62 | ++#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((~0u)<<(s)) + 1) : (x)) |
| 63 | + |
| 64 | + #else |
| 65 | + |
| 66 | +diff --git a/jdk/src/share/native/sun/awt/image/jpeg/jdphuff.c b/jdk/src/share/native/sun/awt/image/jpeg/jdphuff.c |
| 67 | +index d5af6530..c2073036 100644 |
| 68 | +--- a/jdk/src/share/native/sun/awt/image/jpeg/jdphuff.c |
| 69 | ++++ b/jdk/src/share/native/sun/awt/image/jpeg/jdphuff.c |
| 70 | +@@ -204,7 +204,7 @@ start_pass_phuff_decoder (j_decompress_ptr cinfo) |
| 71 | + |
| 72 | + #ifdef AVOID_TABLES |
| 73 | + |
| 74 | +-#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) |
| 75 | ++#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((~0u)<<(s)) + 1) : (x)) |
| 76 | + |
| 77 | + #else |
| 78 | + |
| 79 | +diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c |
| 80 | +index 7f7c911b..16205d29 100644 |
| 81 | +--- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c |
| 82 | ++++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c |
| 83 | +@@ -261,7 +261,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src, |
| 84 | + #ifdef _LITTLE_ENDIAN |
| 85 | + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); |
| 86 | + #else |
| 87 | +- emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); |
| 88 | ++ emask = (mlib_s32)(~0u)<< ((4 - (size - i)) * 8); |
| 89 | + #endif /* _LITTLE_ENDIAN */ |
| 90 | + ((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask); |
| 91 | + |
| 92 | +@@ -270,7 +270,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src, |
| 93 | + #ifdef _LITTLE_ENDIAN |
| 94 | + mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); |
| 95 | + #else |
| 96 | +- mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); |
| 97 | ++ mlib_u64 emask = (mlib_s64)(~0u)<< ((8 - (size - i)) * 8); |
| 98 | + #endif /* _LITTLE_ENDIAN */ |
| 99 | + |
| 100 | + ((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask); |
| 101 | +@@ -397,7 +397,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(const mlib_u8 *src, |
| 102 | + #ifdef _LITTLE_ENDIAN |
| 103 | + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); |
| 104 | + #else |
| 105 | +- emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); |
| 106 | ++ emask = (mlib_s32)(~0u)<< ((4 - (size - i)) * 8); |
| 107 | + #endif /* _LITTLE_ENDIAN */ |
| 108 | + ((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask); |
| 109 | + |
| 110 | +@@ -415,7 +415,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(const mlib_u8 *src, |
| 111 | + #ifdef _LITTLE_ENDIAN |
| 112 | + emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); |
| 113 | + #else |
| 114 | +- emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); |
| 115 | ++ emask = (mlib_s64)(~0u)<< ((8 - (size - i)) * 8); |
| 116 | + #endif /* _LITTLE_ENDIAN */ |
| 117 | + ((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask); |
| 118 | + |
| 119 | +@@ -567,7 +567,7 @@ mlib_status mlib_ImageLookUp_Bit_U8_3(const mlib_u8 *src, |
| 120 | + #ifdef _LITTLE_ENDIAN |
| 121 | + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); |
| 122 | + #else |
| 123 | +- emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); |
| 124 | ++ emask = (mlib_s32)(~0u)<< ((4 - (size - i)) * 8); |
| 125 | + #endif /* _LITTLE_ENDIAN */ |
| 126 | + da[0] = (dd & emask) | (da[0] &~ emask); |
| 127 | + } |
0 commit comments