943 fields[TypeFunc::Parms+0] = NULL; |
943 fields[TypeFunc::Parms+0] = NULL; |
944 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields); |
944 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields); |
945 return TypeFunc::make(domain, range); |
945 return TypeFunc::make(domain, range); |
946 } |
946 } |
947 |
947 |
|
948 const TypeFunc* OptoRuntime::squareToLen_Type() { |
|
949 // create input type (domain) |
|
950 int num_args = 4; |
|
951 int argcnt = num_args; |
|
952 const Type** fields = TypeTuple::fields(argcnt); |
|
953 int argp = TypeFunc::Parms; |
|
954 fields[argp++] = TypePtr::NOTNULL; // x |
|
955 fields[argp++] = TypeInt::INT; // len |
|
956 fields[argp++] = TypePtr::NOTNULL; // z |
|
957 fields[argp++] = TypeInt::INT; // zlen |
|
958 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); |
|
959 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); |
|
960 |
|
961 // no result type needed |
|
962 fields = TypeTuple::fields(1); |
|
963 fields[TypeFunc::Parms+0] = NULL; |
|
964 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields); |
|
965 return TypeFunc::make(domain, range); |
|
966 } |
|
967 |
|
968 // for mulAdd calls, 2 pointers and 3 ints, returning int |
|
969 const TypeFunc* OptoRuntime::mulAdd_Type() { |
|
970 // create input type (domain) |
|
971 int num_args = 5; |
|
972 int argcnt = num_args; |
|
973 const Type** fields = TypeTuple::fields(argcnt); |
|
974 int argp = TypeFunc::Parms; |
|
975 fields[argp++] = TypePtr::NOTNULL; // out |
|
976 fields[argp++] = TypePtr::NOTNULL; // in |
|
977 fields[argp++] = TypeInt::INT; // offset |
|
978 fields[argp++] = TypeInt::INT; // len |
|
979 fields[argp++] = TypeInt::INT; // k |
|
980 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); |
|
981 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); |
|
982 |
|
983 // returning carry (int) |
|
984 fields = TypeTuple::fields(1); |
|
985 fields[TypeFunc::Parms+0] = TypeInt::INT; |
|
986 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields); |
|
987 return TypeFunc::make(domain, range); |
|
988 } |
|
989 |
948 |
990 |
949 |
991 |
950 //------------- Interpreter state access for on stack replacement |
992 //------------- Interpreter state access for on stack replacement |
951 const TypeFunc* OptoRuntime::osr_end_Type() { |
993 const TypeFunc* OptoRuntime::osr_end_Type() { |
952 // create input type (domain) |
994 // create input type (domain) |