386 idx = dst.index();
387 const intptr_t disp = dst.disp();
388 if (precise && (disp != 0 || idx != noreg)) {
389 __ add2reg_with_index(base, disp, idx, base);
390 }
391 g1_write_barrier_post(masm, decorators, base, val, tmp1, tmp2, tmp3);
392 }
393 }
394
395 void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value, Register tmp1, Register tmp2) {
396 NearLabel Ldone, Lnot_weak;
397 __ z_ltgr(tmp1, value);
398 __ z_bre(Ldone); // Use NULL result as-is.
399
400 __ z_nill(value, ~JNIHandles::weak_tag_mask);
401 __ z_lg(value, 0, value); // Resolve (untagged) jobject.
402
403 __ z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag.
404 __ z_braz(Lnot_weak);
405 __ verify_oop(value);
406 DecoratorSet decorators = IN_ROOT | ON_PHANTOM_OOP_REF;
407 g1_write_barrier_pre(masm, decorators, (const Address*)NULL, value, noreg, tmp1, tmp2, true);
408 __ bind(Lnot_weak);
409 __ verify_oop(value);
410 __ bind(Ldone);
411 }
412
413 #ifdef COMPILER1
414
415 #undef __
416 #define __ ce->masm()->
417
418 void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
419 G1BarrierSetC1* bs = (G1BarrierSetC1*)BarrierSet::barrier_set()->barrier_set_c1();
420 // At this point we know that marking is in progress.
421 // If do_load() is true then we have to emit the
422 // load of the previous value; otherwise it has already
423 // been loaded into _pre_val.
424 __ bind(*stub->entry());
425 ce->check_reserved_argument_area(16); // RT stub needs 2 spill slots.
426 assert(stub->pre_val()->is_register(), "Precondition.");
|
386 idx = dst.index();
387 const intptr_t disp = dst.disp();
388 if (precise && (disp != 0 || idx != noreg)) {
389 __ add2reg_with_index(base, disp, idx, base);
390 }
391 g1_write_barrier_post(masm, decorators, base, val, tmp1, tmp2, tmp3);
392 }
393 }
394
395 void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value, Register tmp1, Register tmp2) {
396 NearLabel Ldone, Lnot_weak;
397 __ z_ltgr(tmp1, value);
398 __ z_bre(Ldone); // Use NULL result as-is.
399
400 __ z_nill(value, ~JNIHandles::weak_tag_mask);
401 __ z_lg(value, 0, value); // Resolve (untagged) jobject.
402
403 __ z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag.
404 __ z_braz(Lnot_weak);
405 __ verify_oop(value);
406 DecoratorSet decorators = IN_NATIVE | ON_PHANTOM_OOP_REF;
407 g1_write_barrier_pre(masm, decorators, (const Address*)NULL, value, noreg, tmp1, tmp2, true);
408 __ bind(Lnot_weak);
409 __ verify_oop(value);
410 __ bind(Ldone);
411 }
412
413 #ifdef COMPILER1
414
415 #undef __
416 #define __ ce->masm()->
417
418 void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
419 G1BarrierSetC1* bs = (G1BarrierSetC1*)BarrierSet::barrier_set()->barrier_set_c1();
420 // At this point we know that marking is in progress.
421 // If do_load() is true then we have to emit the
422 // load of the previous value; otherwise it has already
423 // been loaded into _pre_val.
424 __ bind(*stub->entry());
425 ce->check_reserved_argument_area(16); // RT stub needs 2 spill slots.
426 assert(stub->pre_val()->is_register(), "Precondition.");
|