diff src/share/vm/c1/c1_LIRGenerator.cpp @ 2464:d86923d96dca

7034967: C1: assert(false) failed: error (assembler_sparc.cpp:2043) Summary: Fix -XX:+VerifyOops Reviewed-by: kvn, never
author iveresov
date Fri, 08 Apr 2011 17:03:31 -0700
parents 13bc79b5c9c8
children 0654ee04b214 5d046bf49ce7
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIRGenerator.cpp	Thu Apr 07 21:32:23 2011 -0700
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Apr 08 17:03:31 2011 -0700
@@ -1456,7 +1456,7 @@
 
   if (addr->is_address()) {
     LIR_Address* address = addr->as_address_ptr();
-    LIR_Opr ptr = new_register(T_OBJECT);
+    LIR_Opr ptr = new_pointer_register();
     if (!address->index()->is_valid() && address->disp() == 0) {
       __ move(address->base(), ptr);
     } else {
@@ -1508,7 +1508,9 @@
   LIR_Const* card_table_base = new LIR_Const(((CardTableModRefBS*)_bs)->byte_map_base);
   if (addr->is_address()) {
     LIR_Address* address = addr->as_address_ptr();
-    LIR_Opr ptr = new_register(T_OBJECT);
+    // ptr cannot be an object because we use this barrier for array card marks
+    // and addr can point in the middle of an array.
+    LIR_Opr ptr = new_pointer_register();
     if (!address->index()->is_valid() && address->disp() == 0) {
       __ move(address->base(), ptr);
     } else {