< prev index next >

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

Print this page
*** 22,10 ***
--- 22,11 ---
   *
   */
  
  #include "precompiled.hpp"
  #include "asm/macroAssembler.inline.hpp"
+ #include "code/SCCache.hpp"
  #include "gc/g1/g1BarrierSet.hpp"
  #include "gc/g1/g1BarrierSetAssembler.hpp"
  #include "gc/g1/g1BarrierSetRuntime.hpp"
  #include "gc/g1/g1CardTable.hpp"
  #include "gc/g1/g1HeapRegion.hpp"

*** 301,11 ***
  
    __ movptr(card_addr, store_addr);
    __ shrptr(card_addr, CardTable::card_shift());
    // Do not use ExternalAddress to load 'byte_map_base', since 'byte_map_base' is NOT
    // a valid address and therefore is not properly handled by the relocation code.
!   __ movptr(cardtable, (intptr_t)ct->card_table()->byte_map_base());
    __ addptr(card_addr, cardtable);
  
    __ cmpb(Address(card_addr, 0), G1CardTable::g1_young_card_val());
    __ jcc(Assembler::equal, done);
  
--- 302,16 ---
  
    __ movptr(card_addr, store_addr);
    __ shrptr(card_addr, CardTable::card_shift());
    // Do not use ExternalAddress to load 'byte_map_base', since 'byte_map_base' is NOT
    // a valid address and therefore is not properly handled by the relocation code.
!   if (SCCache::is_on_for_write()) {
+     // SCA needs relocation info for this address
+     __ lea(cardtable, ExternalAddress((address)ct->card_table()->byte_map_base()));
+   } else {
+     __ movptr(cardtable, (intptr_t)ct->card_table()->byte_map_base());
+   }
    __ addptr(card_addr, cardtable);
  
    __ cmpb(Address(card_addr, 0), G1CardTable::g1_young_card_val());
    __ jcc(Assembler::equal, done);
  

*** 536,11 ***
  
    __ load_parameter(0, card_addr);
    __ shrptr(card_addr, CardTable::card_shift());
    // Do not use ExternalAddress to load 'byte_map_base', since 'byte_map_base' is NOT
    // a valid address and therefore is not properly handled by the relocation code.
!   __ movptr(cardtable, (intptr_t)ct->card_table()->byte_map_base());
    __ addptr(card_addr, cardtable);
  
    NOT_LP64(__ get_thread(thread);)
  
    __ cmpb(Address(card_addr, 0), G1CardTable::g1_young_card_val());
--- 542,16 ---
  
    __ load_parameter(0, card_addr);
    __ shrptr(card_addr, CardTable::card_shift());
    // Do not use ExternalAddress to load 'byte_map_base', since 'byte_map_base' is NOT
    // a valid address and therefore is not properly handled by the relocation code.
!   if (SCCache::is_on()) {
+     // SCA needs relocation info for this address
+     __ lea(cardtable, ExternalAddress((address)ct->card_table()->byte_map_base()));
+   } else {
+     __ movptr(cardtable, (intptr_t)ct->card_table()->byte_map_base());
+   }
    __ addptr(card_addr, cardtable);
  
    NOT_LP64(__ get_thread(thread);)
  
    __ cmpb(Address(card_addr, 0), G1CardTable::g1_young_card_val());
< prev index next >