3403 void MacroAssembler::store_check_part_2(Register obj) { |
3403 void MacroAssembler::store_check_part_2(Register obj) { |
3404 BarrierSet* bs = Universe::heap()->barrier_set(); |
3404 BarrierSet* bs = Universe::heap()->barrier_set(); |
3405 assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind"); |
3405 assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind"); |
3406 CardTableModRefBS* ct = (CardTableModRefBS*)bs; |
3406 CardTableModRefBS* ct = (CardTableModRefBS*)bs; |
3407 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); |
3407 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); |
3408 ExternalAddress cardtable((address)ct->byte_map_base); |
3408 |
3409 Address index(noreg, obj, Address::times_1); |
3409 // The calculation for byte_map_base is as follows: |
3410 |
3410 // byte_map_base = _byte_map - (uintptr_t(low_bound) >> card_shift); |
3411 movb(as_Address(ArrayAddress(cardtable, index)), 0); |
3411 // So this essentially converts an address to a displacement and |
|
3412 // it will never need to be relocated. On 64bit however the value may be too |
|
3413 // large for a 32bit displacement |
|
3414 |
|
3415 intptr_t disp = (intptr_t) ct->byte_map_base; |
|
3416 Address cardtable(noreg, obj, Address::times_1, disp); |
|
3417 movb(cardtable, 0); |
3412 } |
3418 } |
3413 |
3419 |
3414 |
3420 |
3415 void MacroAssembler::c2bool(Register x) { |
3421 void MacroAssembler::c2bool(Register x) { |
3416 // implements x == 0 ? 0 : 1 |
3422 // implements x == 0 ? 0 : 1 |