diff src/share/vm/opto/library_call.cpp @ 29:d5fc211aea19

6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM Summary: T_ADDRESS size is defined as 'int' size (4 bytes) but C2 use it for raw pointers and as memory type for StoreP and LoadP nodes. Reviewed-by: jrose
author kvn
date Mon, 25 Feb 2008 15:05:44 -0800
parents a61af66fc99e
children 545c277a3ecf
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp	Fri Feb 22 17:55:13 2008 -0800
+++ b/src/share/vm/opto/library_call.cpp	Mon Feb 25 15:05:44 2008 -0800
@@ -2097,7 +2097,7 @@
   int type_words = type2size[type];
 
   // Cannot inline wide CAS on machines that don't support it natively
-  if (type2aelembytes[type] > BytesPerInt && !VM_Version::supports_cx8())
+  if (type2aelembytes(type) > BytesPerInt && !VM_Version::supports_cx8())
     return false;
 
   C->set_has_unsafe_access(true);  // Mark eventual nmethod as "unsafe".
@@ -3975,7 +3975,7 @@
     // both indices are constants
     int s_offs = src_offset_inttype->get_con();
     int d_offs = dest_offset_inttype->get_con();
-    int element_size = type2aelembytes[t];
+    int element_size = type2aelembytes(t);
     aligned = ((arrayOopDesc::base_offset_in_bytes(t) + s_offs * element_size) % HeapWordSize == 0) &&
               ((arrayOopDesc::base_offset_in_bytes(t) + d_offs * element_size) % HeapWordSize == 0);
     if (s_offs >= d_offs)  disjoint = true;
@@ -4389,7 +4389,7 @@
     if (alloc != NULL && use_ReduceInitialCardMarks()) {
       // If we do not need card marks, copy using the jint or jlong stub.
       copy_type = LP64_ONLY(T_LONG) NOT_LP64(T_INT);
-      assert(type2aelembytes[basic_elem_type] == type2aelembytes[copy_type],
+      assert(type2aelembytes(basic_elem_type) == type2aelembytes(copy_type),
              "sizes agree");
     }
   }
@@ -4659,7 +4659,7 @@
   Node* mem = memory(adr_type); // memory slice to operate on
 
   // scaling and rounding of indexes:
-  int scale = exact_log2(type2aelembytes[basic_elem_type]);
+  int scale = exact_log2(type2aelembytes(basic_elem_type));
   int abase = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
   int clear_low = (-1 << scale) & (BytesPerInt  - 1);
   int bump_bit  = (-1 << scale) & BytesPerInt;
@@ -4753,7 +4753,7 @@
                                          Node* dest, Node* dest_offset,
                                          Node* dest_size) {
   // See if there is an advantage from block transfer.
-  int scale = exact_log2(type2aelembytes[basic_elem_type]);
+  int scale = exact_log2(type2aelembytes(basic_elem_type));
   if (scale >= LogBytesPerLong)
     return false;               // it is already a block transfer