Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp @ 342:37f87013dfd8
6711316: Open source the Garbage-First garbage collector
Summary: First mercurial integration of the code for the Garbage-First garbage collector.
Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author | ysr |
---|---|
date | Thu, 05 Jun 2008 15:57:56 -0700 |
parents | a61af66fc99e |
children | 6b2273dd6fa9 |
comparison
equal
deleted
inserted
replaced
189:0b27f3512f9e | 342:37f87013dfd8 |
---|---|
402 __ br(Assembler::always, false, Assembler::pt, _continuation); | 402 __ br(Assembler::always, false, Assembler::pt, _continuation); |
403 __ delayed()->nop(); | 403 __ delayed()->nop(); |
404 } | 404 } |
405 | 405 |
406 | 406 |
407 /////////////////////////////////////////////////////////////////////////////////// | |
408 #ifndef SERIALGC | |
409 | |
410 void G1PreBarrierStub::emit_code(LIR_Assembler* ce) { | |
411 __ bind(_entry); | |
412 | |
413 assert(pre_val()->is_register(), "Precondition."); | |
414 | |
415 Register pre_val_reg = pre_val()->as_register(); | |
416 | |
417 ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false); | |
418 __ br_on_reg_cond(Assembler::rc_z, /*annul*/false, Assembler::pt, | |
419 pre_val_reg, _continuation); | |
420 __ delayed()->nop(); | |
421 | |
422 __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_pre_barrier_slow_id)); | |
423 __ delayed()->mov(pre_val_reg, G4); | |
424 __ br(Assembler::always, false, Assembler::pt, _continuation); | |
425 __ delayed()->nop(); | |
426 | |
427 } | |
428 | |
429 jbyte* G1PostBarrierStub::_byte_map_base = NULL; | |
430 | |
431 jbyte* G1PostBarrierStub::byte_map_base_slow() { | |
432 BarrierSet* bs = Universe::heap()->barrier_set(); | |
433 assert(bs->is_a(BarrierSet::G1SATBCTLogging), | |
434 "Must be if we're using this."); | |
435 return ((G1SATBCardTableModRefBS*)bs)->byte_map_base; | |
436 } | |
437 | |
438 void G1PostBarrierStub::emit_code(LIR_Assembler* ce) { | |
439 __ bind(_entry); | |
440 | |
441 assert(addr()->is_register(), "Precondition."); | |
442 assert(new_val()->is_register(), "Precondition."); | |
443 Register addr_reg = addr()->as_pointer_register(); | |
444 Register new_val_reg = new_val()->as_register(); | |
445 __ br_on_reg_cond(Assembler::rc_z, /*annul*/false, Assembler::pt, | |
446 new_val_reg, _continuation); | |
447 __ delayed()->nop(); | |
448 | |
449 __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_post_barrier_slow_id)); | |
450 __ delayed()->mov(addr_reg, G4); | |
451 __ br(Assembler::always, false, Assembler::pt, _continuation); | |
452 __ delayed()->nop(); | |
453 } | |
454 | |
455 #endif // SERIALGC | |
456 /////////////////////////////////////////////////////////////////////////////////// | |
457 | |
407 #undef __ | 458 #undef __ |