6717457: Internal Error (src/share/vm/code/relocInfo.hpp:1089)
authornever
Fri, 25 Jul 2008 09:07:29 -0700
changeset 957 386f9fbd4cb3
parent 956 f1aadc829f59
child 958 4c4709e8b7ee
6717457: Internal Error (src/share/vm/code/relocInfo.hpp:1089) Reviewed-by: kvn
hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Mon Jul 21 13:37:05 2008 -0700
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Fri Jul 25 09:07:29 2008 -0700
@@ -779,9 +779,9 @@
           __ shrl(end,   CardTableModRefBS::card_shift);
           __ subl(end, start); // end --> count
         __ BIND(L_loop);
-          ExternalAddress base((address)ct->byte_map_base);
-          Address index(start, count, Address::times_1, 0);
-          __ movbyte(ArrayAddress(base, index), 0);
+          intptr_t disp = (intptr_t) ct->byte_map_base;
+          Address cardtable(start, count, Address::times_1, disp);
+          __ movb(cardtable, 0);
           __ decrement(count);
           __ jcc(Assembler::greaterEqual, L_loop);
         }
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Mon Jul 21 13:37:05 2008 -0700
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Fri Jul 25 09:07:29 2008 -0700
@@ -1222,8 +1222,16 @@
            __ shrq(end, CardTableModRefBS::card_shift);
            __ subq(end, start); // number of bytes to copy
 
+          intptr_t disp = (intptr_t) ct->byte_map_base;
+          if (__ is_simm32(disp)) {
+            Address cardtable(noreg, noreg, Address::no_scale, disp);
+            __ lea(scratch, cardtable);
+          } else {
+            ExternalAddress cardtable((address)disp);
+            __ lea(scratch, cardtable);
+          }
+
           const Register count = end; // 'end' register contains bytes count now
-          __ lea(scratch, ExternalAddress((address)ct->byte_map_base));
           __ addq(start, scratch);
         __ BIND(L_loop);
           __ movb(Address(start, count, Address::times_1), 0);