< prev index next >

src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp

Print this page




 517   __ add(tmp, LIR_OprFact::address(shifted_reg_operand), tmp2); // tmp2 = tmp + (addr >> CardTable::card_shift)
 518   LIR_Address* card_addr = new LIR_Address(tmp2, T_BYTE);
 519 #else
 520   // Use unsigned type T_BOOLEAN here rather than (signed) T_BYTE since signed load
 521   // byte instruction does not support the addressing mode we need.
 522   LIR_Address* card_addr = new LIR_Address(tmp, addr, (LIR_Address::Scale) -CardTable::card_shift, 0, T_BOOLEAN);
 523 #endif
 524   if (UseCondCardMark) {
 525     if (UseConcMarkSweepGC) {
 526       __ membar_storeload();
 527     }
 528     LIR_Opr cur_value = new_register(T_INT);
 529     __ move(card_addr, cur_value);
 530 
 531     LabelObj* L_already_dirty = new LabelObj();
 532     __ cmp(lir_cond_equal, cur_value, LIR_OprFact::intConst(CardTable::dirty_card_val()));
 533     __ branch(lir_cond_equal, T_BYTE, L_already_dirty->label());
 534     set_card(tmp, card_addr);
 535     __ branch_destination(L_already_dirty->label());
 536   } else {
 537 #if INCLUDE_ALL_GCS
 538     if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
 539       __ membar_storestore();
 540     }
 541 #endif
 542     set_card(tmp, card_addr);
 543   }
 544 }
 545 
 546 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info, ciMethod* profiled_method, int profiled_bci) {
 547   LIR_Opr tmp1 = FrameMap::R0_oop_opr;
 548   LIR_Opr tmp2 = FrameMap::R1_oop_opr;
 549   LIR_Opr tmp3 = LIR_OprFact::illegalOpr;
 550   __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 551 }
 552 
 553 //----------------------------------------------------------------------
 554 //             visitor functions
 555 //----------------------------------------------------------------------
 556 
 557 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {




 517   __ add(tmp, LIR_OprFact::address(shifted_reg_operand), tmp2); // tmp2 = tmp + (addr >> CardTable::card_shift)
 518   LIR_Address* card_addr = new LIR_Address(tmp2, T_BYTE);
 519 #else
 520   // Use unsigned type T_BOOLEAN here rather than (signed) T_BYTE since signed load
 521   // byte instruction does not support the addressing mode we need.
 522   LIR_Address* card_addr = new LIR_Address(tmp, addr, (LIR_Address::Scale) -CardTable::card_shift, 0, T_BOOLEAN);
 523 #endif
 524   if (UseCondCardMark) {
 525     if (UseConcMarkSweepGC) {
 526       __ membar_storeload();
 527     }
 528     LIR_Opr cur_value = new_register(T_INT);
 529     __ move(card_addr, cur_value);
 530 
 531     LabelObj* L_already_dirty = new LabelObj();
 532     __ cmp(lir_cond_equal, cur_value, LIR_OprFact::intConst(CardTable::dirty_card_val()));
 533     __ branch(lir_cond_equal, T_BYTE, L_already_dirty->label());
 534     set_card(tmp, card_addr);
 535     __ branch_destination(L_already_dirty->label());
 536   } else {
 537 #if INCLUDE_CMSGC
 538     if (UseConcMarkSweepGC && CMSPrecleaningEnabled) {
 539       __ membar_storestore();
 540     }
 541 #endif
 542     set_card(tmp, card_addr);
 543   }
 544 }
 545 
 546 void LIRGenerator::array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info, ciMethod* profiled_method, int profiled_bci) {
 547   LIR_Opr tmp1 = FrameMap::R0_oop_opr;
 548   LIR_Opr tmp2 = FrameMap::R1_oop_opr;
 549   LIR_Opr tmp3 = LIR_OprFact::illegalOpr;
 550   __ store_check(value, array, tmp1, tmp2, tmp3, store_check_info, profiled_method, profiled_bci);
 551 }
 552 
 553 //----------------------------------------------------------------------
 554 //             visitor functions
 555 //----------------------------------------------------------------------
 556 
 557 void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {


< prev index next >