comparison src/share/vm/opto/graphKit.cpp @ 563:1b9fc6e3171b

6442502: assert(bits,"Use TypePtr for NULL") on linux-x86 Reviewed-by: kvn
author never
date Wed, 04 Feb 2009 23:17:38 -0800
parents be41fa651400
children 7fe62bb75bf4
comparison
equal deleted inserted replaced
562:1580954e694c 563:1b9fc6e3171b
1834 "Only one we handle so far."); 1834 "Only one we handle so far.");
1835 CardTableModRefBS* ct = 1835 CardTableModRefBS* ct =
1836 (CardTableModRefBS*)(Universe::heap()->barrier_set()); 1836 (CardTableModRefBS*)(Universe::heap()->barrier_set());
1837 Node *b = _gvn.transform(new (C, 3) URShiftXNode( cast, _gvn.intcon(CardTableModRefBS::card_shift) )); 1837 Node *b = _gvn.transform(new (C, 3) URShiftXNode( cast, _gvn.intcon(CardTableModRefBS::card_shift) ));
1838 // We store into a byte array, so do not bother to left-shift by zero 1838 // We store into a byte array, so do not bother to left-shift by zero
1839 // Get base of card map 1839 Node *c = byte_map_base_node();
1840 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte),
1841 "adjust this code");
1842 Node *c = makecon(TypeRawPtr::make((address)ct->byte_map_base));
1843 // Combine 1840 // Combine
1844 Node *sb_ctl = control(); 1841 Node *sb_ctl = control();
1845 Node *sb_adr = _gvn.transform(new (C, 4) AddPNode( top()/*no base ptr*/, c, b )); 1842 Node *sb_adr = _gvn.transform(new (C, 4) AddPNode( top()/*no base ptr*/, c, b ));
1846 Node *sb_val = _gvn.intcon(0); 1843 Node *sb_val = _gvn.intcon(0);
1847 // Smash zero into card 1844 // Smash zero into card
3363 // Get the alias_index for raw card-mark memory 3360 // Get the alias_index for raw card-mark memory
3364 const TypePtr* card_type = TypeRawPtr::BOTTOM; 3361 const TypePtr* card_type = TypeRawPtr::BOTTOM;
3365 3362
3366 const TypeFunc *tf = OptoRuntime::g1_wb_post_Type(); 3363 const TypeFunc *tf = OptoRuntime::g1_wb_post_Type();
3367 3364
3368 // Get the address of the card table
3369 CardTableModRefBS* ct =
3370 (CardTableModRefBS*)(Universe::heap()->barrier_set());
3371 Node *card_table = __ makecon(TypeRawPtr::make((address)ct->byte_map_base));
3372 // Get base of card map
3373 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
3374
3375
3376 // Offsets into the thread 3365 // Offsets into the thread
3377 const int index_offset = in_bytes(JavaThread::dirty_card_queue_offset() + 3366 const int index_offset = in_bytes(JavaThread::dirty_card_queue_offset() +
3378 PtrQueue::byte_offset_of_index()); 3367 PtrQueue::byte_offset_of_index());
3379 const int buffer_offset = in_bytes(JavaThread::dirty_card_queue_offset() + 3368 const int buffer_offset = in_bytes(JavaThread::dirty_card_queue_offset() +
3380 PtrQueue::byte_offset_of_buf()); 3369 PtrQueue::byte_offset_of_buf());
3400 3389
3401 // Divide pointer by card size 3390 // Divide pointer by card size
3402 Node* card_offset = __ URShiftX( cast, __ ConI(CardTableModRefBS::card_shift) ); 3391 Node* card_offset = __ URShiftX( cast, __ ConI(CardTableModRefBS::card_shift) );
3403 3392
3404 // Combine card table base and card offset 3393 // Combine card table base and card offset
3405 Node *card_adr = __ AddP(no_base, card_table, card_offset ); 3394 Node *card_adr = __ AddP(no_base, byte_map_base_node(), card_offset );
3406 3395
3407 // If we know the value being stored does it cross regions? 3396 // If we know the value being stored does it cross regions?
3408 3397
3409 if (val != NULL) { 3398 if (val != NULL) {
3410 // Does the store cause us to cross regions? 3399 // Does the store cause us to cross regions?