1 /*
 2  * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
 3  *  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 4  *
 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
 7  *  published by the Free Software Foundation.
 8  *
 9  *  This code is distributed in the hope that it will be useful, but WITHOUT
10  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  *  version 2 for more details (a copy is included in the LICENSE file that
13  *  accompanied this code).
14  *
15  *  You should have received a copy of the GNU General Public License version
16  *  2 along with this work; if not, write to the Free Software Foundation,
17  *  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  *   Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  *  or visit www.oracle.com if you need additional information or have any
21  *  questions.
22  *
23  */
24 
25 #ifdef _WIN64
26 #define EXPORT __declspec(dllexport)
27 #else
28 #define EXPORT
29 #endif
30 
31 EXPORT void empty() {
32 }
33 
34 EXPORT char identity_char(char x) {
35     return x;
36 }
37 
38 EXPORT short identity_short(short x) {
39     return x;
40 }
41 
42 EXPORT int identity_int(int x) {
43     return x;
44 }
45 
46 EXPORT long long identity_long(long long x) {
47     return x;
48 }
49 
50 EXPORT float identity_float(float x) {
51     return x;
52 }
53 
54 EXPORT double identity_double(double x) {
55     return x;
56 }
57 
58 EXPORT int identity_va(int x, ...) {
59     return x;
60 }
61 
62 EXPORT int invoke_high_arity0(int x, double d, long long l, float f, char c, short s1, short s2) {
63     return x;
64 }
65 EXPORT double invoke_high_arity1(int x, double d, long long l, float f, char c, short s1, short s2) {
66     return d;
67 }
68 EXPORT long long invoke_high_arity2(int x, double d, long long l, float f, char c, short s1, short s2) {
69     return l;
70 }
71 EXPORT float invoke_high_arity3(int x, double d, long long l, float f, char c, short s1, short s2) {
72     return f;
73 }
74 EXPORT char invoke_high_arity4(int x, double d, long long l, float f, char c, short s1, short s2) {
75     return c;
76 }
77 EXPORT short invoke_high_arity5(int x, double d, long long l, float f, char c, short s1, short s2) {
78     return s1;
79 }
80 EXPORT short invoke_high_arity6(int x, double d, long long l, float f, char c, short s1, short s2) {
81     return s2;
82 }