src/share/vm/opto/runtime.cpp

changeset 8489
51c505229e71
parent 8307
daaf806995b3
child 8318
ea7ac121a5d3
     1.1 --- a/src/share/vm/opto/runtime.cpp	Mon Mar 21 14:58:37 2016 -0700
     1.2 +++ b/src/share/vm/opto/runtime.cpp	Wed Feb 17 13:40:12 2016 +0300
     1.3 @@ -956,6 +956,48 @@
     1.4    return TypeFunc::make(domain, range);
     1.5  }
     1.6  
     1.7 +const TypeFunc* OptoRuntime::squareToLen_Type() {
     1.8 +  // create input type (domain)
     1.9 +  int num_args      = 4;
    1.10 +  int argcnt = num_args;
    1.11 +  const Type** fields = TypeTuple::fields(argcnt);
    1.12 +  int argp = TypeFunc::Parms;
    1.13 +  fields[argp++] = TypePtr::NOTNULL;    // x
    1.14 +  fields[argp++] = TypeInt::INT;        // len
    1.15 +  fields[argp++] = TypePtr::NOTNULL;    // z
    1.16 +  fields[argp++] = TypeInt::INT;        // zlen
    1.17 +  assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
    1.18 +  const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
    1.19 +
    1.20 +  // no result type needed
    1.21 +  fields = TypeTuple::fields(1);
    1.22 +  fields[TypeFunc::Parms+0] = NULL;
    1.23 +  const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields);
    1.24 +  return TypeFunc::make(domain, range);
    1.25 +}
    1.26 +
    1.27 +// for mulAdd calls, 2 pointers and 3 ints, returning int
    1.28 +const TypeFunc* OptoRuntime::mulAdd_Type() {
    1.29 +  // create input type (domain)
    1.30 +  int num_args      = 5;
    1.31 +  int argcnt = num_args;
    1.32 +  const Type** fields = TypeTuple::fields(argcnt);
    1.33 +  int argp = TypeFunc::Parms;
    1.34 +  fields[argp++] = TypePtr::NOTNULL;    // out
    1.35 +  fields[argp++] = TypePtr::NOTNULL;    // in
    1.36 +  fields[argp++] = TypeInt::INT;        // offset
    1.37 +  fields[argp++] = TypeInt::INT;        // len
    1.38 +  fields[argp++] = TypeInt::INT;        // k
    1.39 +  assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
    1.40 +  const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
    1.41 +
    1.42 +  // returning carry (int)
    1.43 +  fields = TypeTuple::fields(1);
    1.44 +  fields[TypeFunc::Parms+0] = TypeInt::INT;
    1.45 +  const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields);
    1.46 +  return TypeFunc::make(domain, range);
    1.47 +}
    1.48 +
    1.49  
    1.50  
    1.51  //------------- Interpreter state access for on stack replacement

mercurial