src/hotspot/cpu/sparc/stubGenerator_sparc.cpp
changeset 49164 7e958a8ebcd3
parent 48807 fd8ccb37fce9
child 49347 edb65305d3ac
child 56276 ee5e58456be5
--- a/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp	Mon Feb 26 09:34:20 2018 +0100
+++ b/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp	Mon Feb 26 09:34:12 2018 +0100
@@ -24,6 +24,8 @@
 
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
+#include "gc/shared/cardTable.hpp"
+#include "gc/shared/cardTableModRefBS.hpp"
 #include "interpreter/interpreter.hpp"
 #include "nativeInst_sparc.hpp"
 #include "oops/instanceOop.hpp"
@@ -875,9 +877,7 @@
           DEBUG_ONLY(__ set(0xDEADC0DE, tmp);) // we have killed tmp
         }
         break;
-      case BarrierSet::CardTableForRS:
-      case BarrierSet::CardTableExtension:
-      case BarrierSet::ModRef:
+      case BarrierSet::CardTableModRef:
         break;
       default:
         ShouldNotReachHere();
@@ -908,11 +908,11 @@
           __ restore();
         }
         break;
-      case BarrierSet::CardTableForRS:
-      case BarrierSet::CardTableExtension:
+      case BarrierSet::CardTableModRef:
         {
-          CardTableModRefBS* ct = barrier_set_cast<CardTableModRefBS>(bs);
-          assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
+          CardTableModRefBS* ctbs = barrier_set_cast<CardTableModRefBS>(bs);
+          CardTable* ct = ctbs->card_table();
+          assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
           assert_different_registers(addr, count, tmp);
 
           Label L_loop, L_done;
@@ -923,10 +923,10 @@
           __ sub(count, BytesPerHeapOop, count);
           __ add(count, addr, count);
           // Use two shifts to clear out those low order two bits! (Cannot opt. into 1.)
-          __ srl_ptr(addr, CardTableModRefBS::card_shift, addr);
-          __ srl_ptr(count, CardTableModRefBS::card_shift, count);
+          __ srl_ptr(addr, CardTable::card_shift, addr);
+          __ srl_ptr(count, CardTable::card_shift, count);
           __ sub(count, addr, count);
-          AddressLiteral rs(ct->byte_map_base);
+          AddressLiteral rs(ct->byte_map_base());
           __ set(rs, tmp);
         __ BIND(L_loop);
           __ stb(G0, tmp, addr);