comparison 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
comparison
equal deleted inserted replaced
549:fe3d7c11b4b7 570:dca06e7f503d
1 /* 1 /*
2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
72 extern int LogBitsPerHeapOop; 72 extern int LogBitsPerHeapOop;
73 extern int BytesPerHeapOop; 73 extern int BytesPerHeapOop;
74 extern int BitsPerHeapOop; 74 extern int BitsPerHeapOop;
75 75
76 const int BitsPerJavaInteger = 32; 76 const int BitsPerJavaInteger = 32;
77 const int BitsPerJavaLong = 64;
77 const int BitsPerSize_t = size_tSize * BitsPerByte; 78 const int BitsPerSize_t = size_tSize * BitsPerByte;
78 79
79 // Size of a char[] needed to represent a jint as a string in decimal. 80 // Size of a char[] needed to represent a jint as a string in decimal.
80 const int jintAsStringSize = 12; 81 const int jintAsStringSize = 12;
81 82
904 if (!is_power_of_2(x)) basic_fatal("x must be a power of 2"); 905 if (!is_power_of_2(x)) basic_fatal("x must be a power of 2");
905 #endif 906 #endif
906 return log2_intptr(x); 907 return log2_intptr(x);
907 } 908 }
908 909
910 //* the argument must be exactly a power of 2
911 inline int exact_log2_long(jlong x) {
912 #ifdef ASSERT
913 if (!is_power_of_2_long(x)) basic_fatal("x must be a power of 2");
914 #endif
915 return log2_long(x);
916 }
917
909 918
910 // returns integer round-up to the nearest multiple of s (s must be a power of two) 919 // returns integer round-up to the nearest multiple of s (s must be a power of two)
911 inline intptr_t round_to(intptr_t x, uintx s) { 920 inline intptr_t round_to(intptr_t x, uintx s) {
912 #ifdef ASSERT 921 #ifdef ASSERT
913 if (!is_power_of_2(s)) basic_fatal("s must be a power of 2"); 922 if (!is_power_of_2(s)) basic_fatal("s must be a power of 2");