< prev index next >

src/share/vm/c1/c1_LIRGenerator.cpp

Print this page




1652   if (addr->is_address()) {
1653     LIR_Address* address = addr->as_address_ptr();
1654     LIR_Opr ptr = new_pointer_register();
1655     if (!address->index()->is_valid() && address->disp() == 0) {
1656       __ move(address->base(), ptr);
1657     } else {
1658       assert(address->disp() != max_jint, "lea doesn't support patched addresses!");
1659       __ leal(addr, ptr);
1660     }
1661     addr = ptr;
1662   }
1663   assert(addr->is_register(), "must be a register at this point");
1664 
1665   LabelObj* L_done = new LabelObj();
1666   __ cmp(lir_cond_equal, new_val, LIR_OprFact::oopConst(NULL_WORD));
1667   __ branch(lir_cond_equal, T_OBJECT, L_done->label());
1668 
1669   ShenandoahConnectionMatrix* matrix = ShenandoahHeap::heap()->connection_matrix();
1670 
1671   LIR_Opr heap_base = new_pointer_register();
1672   __ move(LIR_OprFact::intptrConst(ShenandoahHeap::heap()->first_region_bottom()), heap_base);
1673 
1674   LIR_Opr tmp1 = new_pointer_register();
1675   __ move(new_val, tmp1);
1676   __ sub(tmp1, heap_base, tmp1);
1677   __ unsigned_shift_right(tmp1, LIR_OprFact::intConst(ShenandoahHeapRegion::region_size_shift_jint()), tmp1, LIR_OprDesc::illegalOpr());
1678 
1679   LIR_Opr tmp2 = new_pointer_register();
1680   __ move(addr, tmp2);
1681   __ sub(tmp2, heap_base, tmp2);
1682   __ unsigned_shift_right(tmp2, LIR_OprFact::intConst(ShenandoahHeapRegion::region_size_shift_jint()), tmp2, LIR_OprDesc::illegalOpr());
1683 
1684   LIR_Opr tmp3 = new_pointer_register();
1685   __ move(LIR_OprFact::longConst(matrix->stride_jint()), tmp3);
1686   __ mul(tmp1, tmp3, tmp1);
1687   __ add(tmp1, tmp2, tmp1);
1688 
1689   LIR_Opr tmp4 = new_pointer_register();
1690   __ move(LIR_OprFact::intptrConst((intptr_t) matrix->matrix_addr()), tmp4);
1691   LIR_Address* matrix_elem_addr = new LIR_Address(tmp4, tmp1, T_BYTE);
1692 




1652   if (addr->is_address()) {
1653     LIR_Address* address = addr->as_address_ptr();
1654     LIR_Opr ptr = new_pointer_register();
1655     if (!address->index()->is_valid() && address->disp() == 0) {
1656       __ move(address->base(), ptr);
1657     } else {
1658       assert(address->disp() != max_jint, "lea doesn't support patched addresses!");
1659       __ leal(addr, ptr);
1660     }
1661     addr = ptr;
1662   }
1663   assert(addr->is_register(), "must be a register at this point");
1664 
1665   LabelObj* L_done = new LabelObj();
1666   __ cmp(lir_cond_equal, new_val, LIR_OprFact::oopConst(NULL_WORD));
1667   __ branch(lir_cond_equal, T_OBJECT, L_done->label());
1668 
1669   ShenandoahConnectionMatrix* matrix = ShenandoahHeap::heap()->connection_matrix();
1670 
1671   LIR_Opr heap_base = new_pointer_register();
1672   __ move(LIR_OprFact::intptrConst(ShenandoahHeap::heap()->base()), heap_base);
1673 
1674   LIR_Opr tmp1 = new_pointer_register();
1675   __ move(new_val, tmp1);
1676   __ sub(tmp1, heap_base, tmp1);
1677   __ unsigned_shift_right(tmp1, LIR_OprFact::intConst(ShenandoahHeapRegion::region_size_shift_jint()), tmp1, LIR_OprDesc::illegalOpr());
1678 
1679   LIR_Opr tmp2 = new_pointer_register();
1680   __ move(addr, tmp2);
1681   __ sub(tmp2, heap_base, tmp2);
1682   __ unsigned_shift_right(tmp2, LIR_OprFact::intConst(ShenandoahHeapRegion::region_size_shift_jint()), tmp2, LIR_OprDesc::illegalOpr());
1683 
1684   LIR_Opr tmp3 = new_pointer_register();
1685   __ move(LIR_OprFact::longConst(matrix->stride_jint()), tmp3);
1686   __ mul(tmp1, tmp3, tmp1);
1687   __ add(tmp1, tmp2, tmp1);
1688 
1689   LIR_Opr tmp4 = new_pointer_register();
1690   __ move(LIR_OprFact::intptrConst((intptr_t) matrix->matrix_addr()), tmp4);
1691   LIR_Address* matrix_elem_addr = new LIR_Address(tmp4, tmp1, T_BYTE);
1692 


< prev index next >