diff -r 33688f44fb2a -r ad8c0e8de29f hotspot/src/share/vm/utilities/globalDefinitions.hpp --- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp Mon Apr 04 13:40:18 2016 -0700 +++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp Thu Apr 07 09:47:48 2016 -0700 @@ -42,6 +42,12 @@ # include "utilities/globalDefinitions_xlc.hpp" #endif +#ifndef NOINLINE +#define NOINLINE +#endif +#ifndef ALWAYSINLINE +#define ALWAYSINLINE inline +#endif #ifndef PRAGMA_DIAG_PUSH #define PRAGMA_DIAG_PUSH #endif @@ -1084,9 +1090,9 @@ // get a word with the n.th or the right-most or left-most n bits set // (note: #define used only so that they can be used in enum constant definitions) -#define nth_bit(n) (n >= BitsPerWord ? 0 : OneBit << (n)) +#define nth_bit(n) (((n) >= BitsPerWord) ? 0 : (OneBit << (n))) #define right_n_bits(n) (nth_bit(n) - 1) -#define left_n_bits(n) (right_n_bits(n) << (n >= BitsPerWord ? 0 : (BitsPerWord - n))) +#define left_n_bits(n) (right_n_bits(n) << (((n) >= BitsPerWord) ? 0 : (BitsPerWord - (n)))) // bit-operations using a mask m inline void set_bits (intptr_t& x, intptr_t m) { x |= m; }