< prev index next >

src/share/vm/opto/graphKit.cpp

Print this page
rev 7958 : 8152172: PPC64: Support AES intrinsics
Reviewed-by: kvn, mdoerr, simonis
Contributed-by: horii@jp.ibm.com


1666   // operand in pointer arithmetic has bad consequences.
1667   // On the other hand, 32-bit overflow is rare, and the possibility
1668   // can often be excluded, if we annotate the ConvI2L node with
1669   // a type assertion that its value is known to be a small positive
1670   // number.  (The prior range check has ensured this.)
1671   // This assertion is used by ConvI2LNode::Ideal.
1672   int index_max = max_jint - 1;  // array size is max_jint, index is one less
1673   if (sizetype != NULL) index_max = sizetype->_hi - 1;
1674   const TypeInt* iidxtype = TypeInt::make(0, index_max, Type::WidenMax);
1675   idx = C->constrained_convI2L(&_gvn, idx, iidxtype, ctrl);
1676 #endif
1677   Node* scale = _gvn.transform( new (C) LShiftXNode(idx, intcon(shift)) );
1678   return basic_plus_adr(ary, base, scale);
1679 }
1680 
1681 //-------------------------load_array_element-------------------------
1682 Node* GraphKit::load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype) {
1683   const Type* elemtype = arytype->elem();
1684   BasicType elembt = elemtype->array_element_basic_type();
1685   Node* adr = array_element_address(ary, idx, elembt, arytype->size());



1686   Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered);
1687   return ld;
1688 }
1689 
1690 //-------------------------set_arguments_for_java_call-------------------------
1691 // Arguments (pre-popped from the stack) are taken from the JVMS.
1692 void GraphKit::set_arguments_for_java_call(CallJavaNode* call) {
1693   // Add the call arguments:
1694   uint nargs = call->method()->arg_size();
1695   for (uint i = 0; i < nargs; i++) {
1696     Node* arg = argument(i);
1697     call->init_req(i + TypeFunc::Parms, arg);
1698   }
1699 }
1700 
1701 //---------------------------set_edges_for_java_call---------------------------
1702 // Connect a newly created call into the current JVMS.
1703 // A return value node (if any) is returned from set_edges_for_java_call.
1704 void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool separate_io_proj) {
1705 




1666   // operand in pointer arithmetic has bad consequences.
1667   // On the other hand, 32-bit overflow is rare, and the possibility
1668   // can often be excluded, if we annotate the ConvI2L node with
1669   // a type assertion that its value is known to be a small positive
1670   // number.  (The prior range check has ensured this.)
1671   // This assertion is used by ConvI2LNode::Ideal.
1672   int index_max = max_jint - 1;  // array size is max_jint, index is one less
1673   if (sizetype != NULL) index_max = sizetype->_hi - 1;
1674   const TypeInt* iidxtype = TypeInt::make(0, index_max, Type::WidenMax);
1675   idx = C->constrained_convI2L(&_gvn, idx, iidxtype, ctrl);
1676 #endif
1677   Node* scale = _gvn.transform( new (C) LShiftXNode(idx, intcon(shift)) );
1678   return basic_plus_adr(ary, base, scale);
1679 }
1680 
1681 //-------------------------load_array_element-------------------------
1682 Node* GraphKit::load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype) {
1683   const Type* elemtype = arytype->elem();
1684   BasicType elembt = elemtype->array_element_basic_type();
1685   Node* adr = array_element_address(ary, idx, elembt, arytype->size());
1686   if (elembt == T_NARROWOOP) {
1687     elembt = T_OBJECT; // To satisfy switch in LoadNode::make()
1688   }
1689   Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered);
1690   return ld;
1691 }
1692 
1693 //-------------------------set_arguments_for_java_call-------------------------
1694 // Arguments (pre-popped from the stack) are taken from the JVMS.
1695 void GraphKit::set_arguments_for_java_call(CallJavaNode* call) {
1696   // Add the call arguments:
1697   uint nargs = call->method()->arg_size();
1698   for (uint i = 0; i < nargs; i++) {
1699     Node* arg = argument(i);
1700     call->init_req(i + TypeFunc::Parms, arg);
1701   }
1702 }
1703 
1704 //---------------------------set_edges_for_java_call---------------------------
1705 // Connect a newly created call into the current JVMS.
1706 // A return value node (if any) is returned from set_edges_for_java_call.
1707 void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool separate_io_proj) {
1708 


< prev index next >