Mercurial > hg > truffle
diff src/share/vm/utilities/globalDefinitions.hpp @ 570:dca06e7f503d
Merge
author | kvn |
---|---|
date | Tue, 17 Feb 2009 14:30:24 -0800 |
parents | 2328d1d3f8cf 30663ca5e8f4 |
children | 98cb887364d3 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions.hpp Tue Feb 10 18:39:09 2009 +0300 +++ b/src/share/vm/utilities/globalDefinitions.hpp Tue Feb 17 14:30:24 2009 -0800 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,6 +74,7 @@ extern int BitsPerHeapOop; const int BitsPerJavaInteger = 32; +const int BitsPerJavaLong = 64; const int BitsPerSize_t = size_tSize * BitsPerByte; // Size of a char[] needed to represent a jint as a string in decimal. @@ -906,6 +907,14 @@ return log2_intptr(x); } +//* the argument must be exactly a power of 2 +inline int exact_log2_long(jlong x) { + #ifdef ASSERT + if (!is_power_of_2_long(x)) basic_fatal("x must be a power of 2"); + #endif + return log2_long(x); +} + // returns integer round-up to the nearest multiple of s (s must be a power of two) inline intptr_t round_to(intptr_t x, uintx s) {