318 // the referent field in an SATB buffer. Note with
319 // these parameters the pre-barrier does not generate
320 // the load of the previous value
321 // We only reach here if value is not null.
322 g1_write_barrier_pre(masm, decorators | IS_NOT_NULL, noreg /* obj */, (intptr_t)0, dst /* pre_val */,
323 tmp1, tmp2, needs_frame);
324 }
325 __ bind(done);
326 }
327
328 void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value, Register tmp1, Register tmp2, bool needs_frame) {
329 Label done, not_weak;
330 __ cmpdi(CCR0, value, 0);
331 __ beq(CCR0, done); // Use NULL as-is.
332
333 __ clrrdi(tmp1, value, JNIHandles::weak_tag_size);
334 __ andi_(tmp2, value, JNIHandles::weak_tag_mask);
335 __ ld(value, 0, tmp1); // Resolve (untagged) jobject.
336
337 __ beq(CCR0, not_weak); // Test for jweak tag.
338 __ verify_oop(value);
339 g1_write_barrier_pre(masm, IN_NATIVE | ON_PHANTOM_OOP_REF,
340 noreg, noreg, value,
341 tmp1, tmp2, needs_frame);
342 __ bind(not_weak);
343 __ verify_oop(value);
344 __ bind(done);
345 }
346
347 #ifdef COMPILER1
348
349 #undef __
350 #define __ ce->masm()->
351
352 void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
353 G1BarrierSetC1* bs = (G1BarrierSetC1*)BarrierSet::barrier_set()->barrier_set_c1();
354 // At this point we know that marking is in progress.
355 // If do_load() is true then we have to emit the
356 // load of the previous value; otherwise it has already
357 // been loaded into _pre_val.
358
359 __ bind(*stub->entry());
360
361 assert(stub->pre_val()->is_register(), "Precondition.");
362 Register pre_val_reg = stub->pre_val()->as_register();
363
|
318 // the referent field in an SATB buffer. Note with
319 // these parameters the pre-barrier does not generate
320 // the load of the previous value
321 // We only reach here if value is not null.
322 g1_write_barrier_pre(masm, decorators | IS_NOT_NULL, noreg /* obj */, (intptr_t)0, dst /* pre_val */,
323 tmp1, tmp2, needs_frame);
324 }
325 __ bind(done);
326 }
327
328 void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value, Register tmp1, Register tmp2, bool needs_frame) {
329 Label done, not_weak;
330 __ cmpdi(CCR0, value, 0);
331 __ beq(CCR0, done); // Use NULL as-is.
332
333 __ clrrdi(tmp1, value, JNIHandles::weak_tag_size);
334 __ andi_(tmp2, value, JNIHandles::weak_tag_mask);
335 __ ld(value, 0, tmp1); // Resolve (untagged) jobject.
336
337 __ beq(CCR0, not_weak); // Test for jweak tag.
338 __ verify_oop(value, FILE_AND_LINE);
339 g1_write_barrier_pre(masm, IN_NATIVE | ON_PHANTOM_OOP_REF,
340 noreg, noreg, value,
341 tmp1, tmp2, needs_frame);
342 __ bind(not_weak);
343 __ verify_oop(value, FILE_AND_LINE);
344 __ bind(done);
345 }
346
347 #ifdef COMPILER1
348
349 #undef __
350 #define __ ce->masm()->
351
352 void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
353 G1BarrierSetC1* bs = (G1BarrierSetC1*)BarrierSet::barrier_set()->barrier_set_c1();
354 // At this point we know that marking is in progress.
355 // If do_load() is true then we have to emit the
356 // load of the previous value; otherwise it has already
357 // been loaded into _pre_val.
358
359 __ bind(*stub->entry());
360
361 assert(stub->pre_val()->is_register(), "Precondition.");
362 Register pre_val_reg = stub->pre_val()->as_register();
363
|