< prev index next >

src/hotspot/share/opto/runtime.cpp

Print this page




1675 const TypeFunc *OptoRuntime::store_value_type_fields_Type() {
1676   // create input type (domain)
1677   uint total = SharedRuntime::java_return_convention_max_int + SharedRuntime::java_return_convention_max_float*2;
1678   const Type **fields = TypeTuple::fields(total);
1679   // We don't know the number of returned values and their
1680   // types. Assume all registers available to the return convention
1681   // are used.
1682   fields[TypeFunc::Parms] = TypePtr::BOTTOM;
1683   uint i = 1;
1684   for (; i < SharedRuntime::java_return_convention_max_int; i++) {
1685     fields[TypeFunc::Parms+i] = TypeInt::INT;
1686   }
1687   for (; i < total; i+=2) {
1688     fields[TypeFunc::Parms+i] = Type::DOUBLE;
1689     fields[TypeFunc::Parms+i+1] = Type::HALF;
1690   }
1691   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields);
1692 
1693   // create result type (range)
1694   fields = TypeTuple::fields(1);
1695   fields[TypeFunc::Parms+0] = TypeValueTypePtr::NOTNULL;
1696 
1697   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields);
1698 
1699   return TypeFunc::make(domain, range);
1700 }
1701 
1702 const TypeFunc *OptoRuntime::pack_value_type_Type() {
1703   // create input type (domain)
1704   uint total = 1 + SharedRuntime::java_return_convention_max_int + SharedRuntime::java_return_convention_max_float*2;
1705   const Type **fields = TypeTuple::fields(total);
1706   // We don't know the number of returned values and their
1707   // types. Assume all registers available to the return convention
1708   // are used.
1709   fields[TypeFunc::Parms] = TypeRawPtr::BOTTOM;
1710   fields[TypeFunc::Parms+1] = TypeRawPtr::BOTTOM;
1711   uint i = 2;
1712   for (; i < SharedRuntime::java_return_convention_max_int+1; i++) {
1713     fields[TypeFunc::Parms+i] = TypeInt::INT;
1714   }
1715   for (; i < total; i+=2) {
1716     fields[TypeFunc::Parms+i] = Type::DOUBLE;
1717     fields[TypeFunc::Parms+i+1] = Type::HALF;
1718   }
1719   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields);
1720 
1721   // create result type (range)
1722   fields = TypeTuple::fields(1);
1723   fields[TypeFunc::Parms+0] = TypeValueTypePtr::NOTNULL;
1724 
1725   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields);
1726 
1727   return TypeFunc::make(domain, range);
1728 }


1675 const TypeFunc *OptoRuntime::store_value_type_fields_Type() {
1676   // create input type (domain)
1677   uint total = SharedRuntime::java_return_convention_max_int + SharedRuntime::java_return_convention_max_float*2;
1678   const Type **fields = TypeTuple::fields(total);
1679   // We don't know the number of returned values and their
1680   // types. Assume all registers available to the return convention
1681   // are used.
1682   fields[TypeFunc::Parms] = TypePtr::BOTTOM;
1683   uint i = 1;
1684   for (; i < SharedRuntime::java_return_convention_max_int; i++) {
1685     fields[TypeFunc::Parms+i] = TypeInt::INT;
1686   }
1687   for (; i < total; i+=2) {
1688     fields[TypeFunc::Parms+i] = Type::DOUBLE;
1689     fields[TypeFunc::Parms+i+1] = Type::HALF;
1690   }
1691   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields);
1692 
1693   // create result type (range)
1694   fields = TypeTuple::fields(1);
1695   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL;
1696 
1697   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields);
1698 
1699   return TypeFunc::make(domain, range);
1700 }
1701 
1702 const TypeFunc *OptoRuntime::pack_value_type_Type() {
1703   // create input type (domain)
1704   uint total = 1 + SharedRuntime::java_return_convention_max_int + SharedRuntime::java_return_convention_max_float*2;
1705   const Type **fields = TypeTuple::fields(total);
1706   // We don't know the number of returned values and their
1707   // types. Assume all registers available to the return convention
1708   // are used.
1709   fields[TypeFunc::Parms] = TypeRawPtr::BOTTOM;
1710   fields[TypeFunc::Parms+1] = TypeRawPtr::BOTTOM;
1711   uint i = 2;
1712   for (; i < SharedRuntime::java_return_convention_max_int+1; i++) {
1713     fields[TypeFunc::Parms+i] = TypeInt::INT;
1714   }
1715   for (; i < total; i+=2) {
1716     fields[TypeFunc::Parms+i] = Type::DOUBLE;
1717     fields[TypeFunc::Parms+i+1] = Type::HALF;
1718   }
1719   const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + total, fields);
1720 
1721   // create result type (range)
1722   fields = TypeTuple::fields(1);
1723   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL;
1724 
1725   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1,fields);
1726 
1727   return TypeFunc::make(domain, range);
1728 }
< prev index next >