src/share/vm/opto/parse2.cpp
Print this page
rev 5661 : 8024921: PPC64 (part 113): Extend Load and Store nodes to know about memory ordering.
*** 48,58 ****
const Type* elem = Type::TOP;
Node* adr = array_addressing(elem_type, 0, &elem);
if (stopped()) return; // guaranteed null or range check
dec_sp(2); // Pop array and index
const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
! Node* ld = make_load(control(), adr, elem, elem_type, adr_type);
push(ld);
}
//--------------------------------array_store----------------------------------
--- 48,58 ----
const Type* elem = Type::TOP;
Node* adr = array_addressing(elem_type, 0, &elem);
if (stopped()) return; // guaranteed null or range check
dec_sp(2); // Pop array and index
const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
! Node* ld = make_load(control(), adr, elem, elem_type, adr_type, false, LoadNode::unordered);
push(ld);
}
//--------------------------------array_store----------------------------------
*** 60,70 ****
Node* adr = array_addressing(elem_type, 1);
if (stopped()) return; // guaranteed null or range check
Node* val = pop();
dec_sp(2); // Pop array and index
const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
! store_to_memory(control(), adr, val, elem_type, adr_type);
}
//------------------------------array_addressing-------------------------------
// Pull array and index from the stack. Compute pointer-to-element.
--- 60,70 ----
Node* adr = array_addressing(elem_type, 1);
if (stopped()) return; // guaranteed null or range check
Node* val = pop();
dec_sp(2); // Pop array and index
const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
! store_to_memory(control(), adr, val, elem_type, adr_type, false, StoreNode::release_if_reference(elem_type));
}
//------------------------------array_addressing-------------------------------
// Pull array and index from the stack. Compute pointer-to-element.
*** 1718,1735 ****
case Bytecodes::_aaload: array_load(T_OBJECT); break;
case Bytecodes::_laload: {
a = array_addressing(T_LONG, 0);
if (stopped()) return; // guaranteed null or range check
dec_sp(2); // Pop array and index
! push_pair(make_load(control(), a, TypeLong::LONG, T_LONG, TypeAryPtr::LONGS));
break;
}
case Bytecodes::_daload: {
a = array_addressing(T_DOUBLE, 0);
if (stopped()) return; // guaranteed null or range check
dec_sp(2); // Pop array and index
! push_pair(make_load(control(), a, Type::DOUBLE, T_DOUBLE, TypeAryPtr::DOUBLES));
break;
}
case Bytecodes::_bastore: array_store(T_BYTE); break;
case Bytecodes::_castore: array_store(T_CHAR); break;
case Bytecodes::_iastore: array_store(T_INT); break;
--- 1718,1735 ----
case Bytecodes::_aaload: array_load(T_OBJECT); break;
case Bytecodes::_laload: {
a = array_addressing(T_LONG, 0);
if (stopped()) return; // guaranteed null or range check
dec_sp(2); // Pop array and index
! push_pair(make_load(control(), a, TypeLong::LONG, T_LONG, TypeAryPtr::LONGS, false, LoadNode::unordered));
break;
}
case Bytecodes::_daload: {
a = array_addressing(T_DOUBLE, 0);
if (stopped()) return; // guaranteed null or range check
dec_sp(2); // Pop array and index
! push_pair(make_load(control(), a, Type::DOUBLE, T_DOUBLE, TypeAryPtr::DOUBLES, false, LoadNode::unordered));
break;
}
case Bytecodes::_bastore: array_store(T_BYTE); break;
case Bytecodes::_castore: array_store(T_CHAR); break;
case Bytecodes::_iastore: array_store(T_INT); break;
*** 1742,1769 ****
c = pop(); // Oop to store
b = pop(); // index (already used)
a = pop(); // the array itself
const TypeOopPtr* elemtype = _gvn.type(a)->is_aryptr()->elem()->make_oopptr();
const TypeAryPtr* adr_type = TypeAryPtr::OOPS;
! Node* store = store_oop_to_array(control(), a, d, adr_type, c, elemtype, T_OBJECT);
break;
}
case Bytecodes::_lastore: {
a = array_addressing(T_LONG, 2);
if (stopped()) return; // guaranteed null or range check
c = pop_pair();
dec_sp(2); // Pop array and index
! store_to_memory(control(), a, c, T_LONG, TypeAryPtr::LONGS);
break;
}
case Bytecodes::_dastore: {
a = array_addressing(T_DOUBLE, 2);
if (stopped()) return; // guaranteed null or range check
c = pop_pair();
dec_sp(2); // Pop array and index
c = dstore_rounding(c);
! store_to_memory(control(), a, c, T_DOUBLE, TypeAryPtr::DOUBLES);
break;
}
case Bytecodes::_getfield:
do_getfield();
break;
--- 1742,1769 ----
c = pop(); // Oop to store
b = pop(); // index (already used)
a = pop(); // the array itself
const TypeOopPtr* elemtype = _gvn.type(a)->is_aryptr()->elem()->make_oopptr();
const TypeAryPtr* adr_type = TypeAryPtr::OOPS;
! Node* store = store_oop_to_array(control(), a, d, adr_type, c, elemtype, T_OBJECT, StoreNode::release);
break;
}
case Bytecodes::_lastore: {
a = array_addressing(T_LONG, 2);
if (stopped()) return; // guaranteed null or range check
c = pop_pair();
dec_sp(2); // Pop array and index
! store_to_memory(control(), a, c, T_LONG, TypeAryPtr::LONGS, false, StoreNode::unordered);
break;
}
case Bytecodes::_dastore: {
a = array_addressing(T_DOUBLE, 2);
if (stopped()) return; // guaranteed null or range check
c = pop_pair();
dec_sp(2); // Pop array and index
c = dstore_rounding(c);
! store_to_memory(control(), a, c, T_DOUBLE, TypeAryPtr::DOUBLES, false, StoreNode::unordered);
break;
}
case Bytecodes::_getfield:
do_getfield();
break;