45 46 LIRItem& base = access.base().item(); 47 LIR_Opr offset = access.offset().opr(); 48 LIRGenerator *gen = access.gen(); 49 50 LIR_Opr addr_opr; 51 if (is_array) { 52 addr_opr = LIR_OprFact::address(gen->emit_array_address(base.result(), offset, access.type())); 53 } else if (needs_patching) { 54 // we need to patch the offset in the instruction so don't allow 55 // generate_address to try to be smart about emitting the -1. 56 // Otherwise the patching code won't know how to find the 57 // instruction to patch. 58 addr_opr = LIR_OprFact::address(new LIR_Address(base.result(), PATCHED_ADDR, access.type())); 59 } else { 60 addr_opr = LIR_OprFact::address(gen->generate_address(base.result(), offset, 0, 0, access.type())); 61 } 62 63 if (resolve_in_register) { 64 LIR_Opr resolved_addr = gen->new_pointer_register(); 65 __ leal(addr_opr, resolved_addr); 66 resolved_addr = LIR_OprFact::address(new LIR_Address(resolved_addr, access.type())); 67 return resolved_addr; 68 } else { 69 return addr_opr; 70 } 71 } 72 73 void BarrierSetC1::store_at(LIRAccess& access, LIR_Opr value) { 74 DecoratorSet decorators = access.decorators(); 75 bool in_heap = (decorators & IN_HEAP) != 0; 76 assert(in_heap, "not supported yet"); 77 78 LIR_Opr resolved = resolve_address(access, false); 79 access.set_resolved_addr(resolved); 80 store_at_resolved(access, value); 81 } 82 83 void BarrierSetC1::load_at(LIRAccess& access, LIR_Opr result) { 84 DecoratorSet decorators = access.decorators(); 85 bool in_heap = (decorators & IN_HEAP) != 0; 86 assert(in_heap, "not supported yet"); 87 | 45 46 LIRItem& base = access.base().item(); 47 LIR_Opr offset = access.offset().opr(); 48 LIRGenerator *gen = access.gen(); 49 50 LIR_Opr addr_opr; 51 if (is_array) { 52 addr_opr = LIR_OprFact::address(gen->emit_array_address(base.result(), offset, access.type())); 53 } else if (needs_patching) { 54 // we need to patch the offset in the instruction so don't allow 55 // generate_address to try to be smart about emitting the -1. 56 // Otherwise the patching code won't know how to find the 57 // instruction to patch. 58 addr_opr = LIR_OprFact::address(new LIR_Address(base.result(), PATCHED_ADDR, access.type())); 59 } else { 60 addr_opr = LIR_OprFact::address(gen->generate_address(base.result(), offset, 0, 0, access.type())); 61 } 62 63 if (resolve_in_register) { 64 LIR_Opr resolved_addr = gen->new_pointer_register(); 65 if (needs_patching) { 66 __ leal(addr_opr, resolved_addr, lir_patch_normal, access.patch_emit_info()); 67 access.clear_decorators(C1_NEEDS_PATCHING); 68 } else { 69 __ leal(addr_opr, resolved_addr); 70 } 71 return LIR_OprFact::address(new LIR_Address(resolved_addr, access.type())); 72 } else { 73 return addr_opr; 74 } 75 } 76 77 void BarrierSetC1::store_at(LIRAccess& access, LIR_Opr value) { 78 DecoratorSet decorators = access.decorators(); 79 bool in_heap = (decorators & IN_HEAP) != 0; 80 assert(in_heap, "not supported yet"); 81 82 LIR_Opr resolved = resolve_address(access, false); 83 access.set_resolved_addr(resolved); 84 store_at_resolved(access, value); 85 } 86 87 void BarrierSetC1::load_at(LIRAccess& access, LIR_Opr result) { 88 DecoratorSet decorators = access.decorators(); 89 bool in_heap = (decorators & IN_HEAP) != 0; 90 assert(in_heap, "not supported yet"); 91 |