1 /* |
1 /* |
2 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
928 */ |
928 */ |
929 const TypeFunc* OptoRuntime::digestBase_implCompressMB_Type() { |
929 const TypeFunc* OptoRuntime::digestBase_implCompressMB_Type() { |
930 // create input type (domain) |
930 // create input type (domain) |
931 int num_args = 4; |
931 int num_args = 4; |
932 int argcnt = num_args; |
932 int argcnt = num_args; |
|
933 if(CCallingConventionRequiresIntsAsLongs) { |
|
934 argcnt += 2; |
|
935 } |
933 const Type** fields = TypeTuple::fields(argcnt); |
936 const Type** fields = TypeTuple::fields(argcnt); |
934 int argp = TypeFunc::Parms; |
937 int argp = TypeFunc::Parms; |
935 fields[argp++] = TypePtr::NOTNULL; // buf |
938 if(CCallingConventionRequiresIntsAsLongs) { |
936 fields[argp++] = TypePtr::NOTNULL; // state |
939 fields[argp++] = TypePtr::NOTNULL; // buf |
937 fields[argp++] = TypeInt::INT; // ofs |
940 fields[argp++] = TypePtr::NOTNULL; // state |
938 fields[argp++] = TypeInt::INT; // limit |
941 fields[argp++] = TypeLong::LONG; // ofs |
|
942 fields[argp++] = Type::HALF; |
|
943 fields[argp++] = TypeLong::LONG; // limit |
|
944 fields[argp++] = Type::HALF; |
|
945 } else { |
|
946 fields[argp++] = TypePtr::NOTNULL; // buf |
|
947 fields[argp++] = TypePtr::NOTNULL; // state |
|
948 fields[argp++] = TypeInt::INT; // ofs |
|
949 fields[argp++] = TypeInt::INT; // limit |
|
950 } |
939 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); |
951 assert(argp == TypeFunc::Parms+argcnt, "correct decoding"); |
940 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); |
952 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields); |
941 |
953 |
942 // returning ofs (int) |
954 // returning ofs (int) |
943 fields = TypeTuple::fields(1); |
955 fields = TypeTuple::fields(1); |