Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 1609:4311f23817fd
6959430: Make sure raw loads have control edge
Summary: check that raw loads have control edge
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Tue, 15 Jun 2010 18:07:27 -0700 |
parents | c18cbe5936b8 |
children | 4b29a725c43c |
comparison
equal
deleted
inserted
replaced
1608:2389669474a6 | 1609:4311f23817fd |
---|---|
3510 generate_virtual_guard(obj_klass, slow_region); | 3510 generate_virtual_guard(obj_klass, slow_region); |
3511 } | 3511 } |
3512 | 3512 |
3513 // Get the header out of the object, use LoadMarkNode when available | 3513 // Get the header out of the object, use LoadMarkNode when available |
3514 Node* header_addr = basic_plus_adr(obj, oopDesc::mark_offset_in_bytes()); | 3514 Node* header_addr = basic_plus_adr(obj, oopDesc::mark_offset_in_bytes()); |
3515 Node* header = make_load(NULL, header_addr, TypeRawPtr::BOTTOM, T_ADDRESS); | 3515 Node* header = make_load(control(), header_addr, TypeX_X, TypeX_X->basic_type()); |
3516 header = _gvn.transform( new (C, 2) CastP2XNode(NULL, header) ); | |
3517 | 3516 |
3518 // Test the header to see if it is unlocked. | 3517 // Test the header to see if it is unlocked. |
3519 Node *lock_mask = _gvn.MakeConX(markOopDesc::biased_lock_mask_in_place); | 3518 Node *lock_mask = _gvn.MakeConX(markOopDesc::biased_lock_mask_in_place); |
3520 Node *lmasked_header = _gvn.transform( new (C, 3) AndXNode(header, lock_mask) ); | 3519 Node *lmasked_header = _gvn.transform( new (C, 3) AndXNode(header, lock_mask) ); |
3521 Node *unlocked_val = _gvn.MakeConX(markOopDesc::unlocked_value); | 3520 Node *unlocked_val = _gvn.MakeConX(markOopDesc::unlocked_value); |
5200 // for the target array. This is an optimistic check. It will | 5199 // for the target array. This is an optimistic check. It will |
5201 // look in each non-null element's class, at the desired klass's | 5200 // look in each non-null element's class, at the desired klass's |
5202 // super_check_offset, for the desired klass. | 5201 // super_check_offset, for the desired klass. |
5203 int sco_offset = Klass::super_check_offset_offset_in_bytes() + sizeof(oopDesc); | 5202 int sco_offset = Klass::super_check_offset_offset_in_bytes() + sizeof(oopDesc); |
5204 Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset); | 5203 Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset); |
5205 Node* n3 = new(C, 3) LoadINode(NULL, immutable_memory(), p3, TypeRawPtr::BOTTOM); | 5204 Node* n3 = new(C, 3) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr()); |
5206 Node* check_offset = _gvn.transform(n3); | 5205 Node* check_offset = _gvn.transform(n3); |
5207 Node* check_value = dest_elem_klass; | 5206 Node* check_value = dest_elem_klass; |
5208 | 5207 |
5209 Node* src_start = array_element_address(src, src_offset, T_OBJECT); | 5208 Node* src_start = array_element_address(src, src_offset, T_OBJECT); |
5210 Node* dest_start = array_element_address(dest, dest_offset, T_OBJECT); | 5209 Node* dest_start = array_element_address(dest, dest_offset, T_OBJECT); |