289 if (val == noreg) {
290 __ store_heap_oop_null(Address(r3, 0));
291 } else {
292 // G1 barrier needs uncompressed oop for region cross check.
293 Register new_val = val;
294 if (UseCompressedOops) {
295 new_val = rscratch2;
296 __ mov(new_val, val);
297 }
298 __ store_heap_oop(Address(r3, 0), val);
299 g1_write_barrier_post(masm,
300 r3 /* store_adr */,
301 new_val /* new_val */,
302 rthread /* thread */,
303 tmp1 /* tmp */,
304 tmp2 /* tmp2 */);
305 }
306
307 }
308
309 #undef __
310
311 #define __ ce->masm()->
312
313 void G1BarrierSetAssembler::gen_g1_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
314 G1BarrierSetC1* bs = (G1BarrierSetC1*)BarrierSet::barrier_set()->barrier_set_c1();
315 // At this point we know that marking is in progress.
316 // If do_load() is true then we have to emit the
317 // load of the previous value; otherwise it has already
318 // been loaded into _pre_val.
319
320 __ bind(*stub->entry());
321
322 assert(stub->pre_val()->is_register(), "Precondition.");
323
324 Register pre_val_reg = stub->pre_val()->as_register();
325
326 if (stub->do_load()) {
327 ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
328 }
329 __ cbz(pre_val_reg, *stub->continuation());
|
289 if (val == noreg) {
290 __ store_heap_oop_null(Address(r3, 0));
291 } else {
292 // G1 barrier needs uncompressed oop for region cross check.
293 Register new_val = val;
294 if (UseCompressedOops) {
295 new_val = rscratch2;
296 __ mov(new_val, val);
297 }
298 __ store_heap_oop(Address(r3, 0), val);
299 g1_write_barrier_post(masm,
300 r3 /* store_adr */,
301 new_val /* new_val */,
302 rthread /* thread */,
303 tmp1 /* tmp */,
304 tmp2 /* tmp2 */);
305 }
306
307 }
308
309 #ifdef COMPILER1
310
311 #undef __
312 #define __ ce->masm()->
313
314 void G1BarrierSetAssembler::gen_g1_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
315 G1BarrierSetC1* bs = (G1BarrierSetC1*)BarrierSet::barrier_set()->barrier_set_c1();
316 // At this point we know that marking is in progress.
317 // If do_load() is true then we have to emit the
318 // load of the previous value; otherwise it has already
319 // been loaded into _pre_val.
320
321 __ bind(*stub->entry());
322
323 assert(stub->pre_val()->is_register(), "Precondition.");
324
325 Register pre_val_reg = stub->pre_val()->as_register();
326
327 if (stub->do_load()) {
328 ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
329 }
330 __ cbz(pre_val_reg, *stub->continuation());
|
450 __ cbz(rscratch1, runtime);
451 __ sub(rscratch1, rscratch1, wordSize);
452 __ str(rscratch1, queue_index);
453
454 // Reuse LR to hold buffer_addr
455 const Register buffer_addr = lr;
456
457 __ ldr(buffer_addr, buffer);
458 __ str(card_addr, Address(buffer_addr, rscratch1));
459 __ b(done);
460
461 __ bind(runtime);
462 __ push_call_clobbered_registers();
463 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), card_addr, thread);
464 __ pop_call_clobbered_registers();
465 __ bind(done);
466 __ epilogue();
467 }
468
469 #undef __
|
451 __ cbz(rscratch1, runtime);
452 __ sub(rscratch1, rscratch1, wordSize);
453 __ str(rscratch1, queue_index);
454
455 // Reuse LR to hold buffer_addr
456 const Register buffer_addr = lr;
457
458 __ ldr(buffer_addr, buffer);
459 __ str(card_addr, Address(buffer_addr, rscratch1));
460 __ b(done);
461
462 __ bind(runtime);
463 __ push_call_clobbered_registers();
464 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), card_addr, thread);
465 __ pop_call_clobbered_registers();
466 __ bind(done);
467 __ epilogue();
468 }
469
470 #undef __
471
472 #endif // COMPILER1
|