Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/env/J9ArithEnv.cpp
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2016 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
23
#define J9_EXTERNAL_TO_VM
24
25
#include "env/ArithEnv.hpp"
26
#include "j9.h"
27
#include "j9cfg.h"
28
#include "jilconsts.h"
29
#include "j9protos.h"
30
31
float
32
J9::ArithEnv::floatAddFloat(float a, float b)
33
{
34
return helperCFloatPlusFloat(a, b);
35
}
36
37
float
38
J9::ArithEnv::floatSubtractFloat(float a, float b)
39
{
40
return helperCFloatMinusFloat(a, b);
41
}
42
43
float
44
J9::ArithEnv::floatMultiplyFloat(float a, float b)
45
{
46
return helperCFloatMultiplyFloat(a, b);
47
}
48
49
float
50
J9::ArithEnv::floatDivideFloat(float a, float b)
51
{
52
return helperCFloatDivideFloat(a, b);
53
}
54
float
55
J9::ArithEnv::floatRemainderFloat(float a, float b)
56
{
57
return helperCFloatRemainderFloat(a, b);
58
}
59
60
float
61
J9::ArithEnv::floatNegate(float a)
62
{
63
float c;
64
helperNegateFloat(&a, &c);
65
return c;
66
}
67
68
double
69
J9::ArithEnv::doubleAddDouble(double a, double b)
70
{
71
return helperCDoublePlusDouble(a, b);
72
}
73
74
double
75
J9::ArithEnv::doubleSubtractDouble(double a, double b)
76
{
77
return helperCDoubleMinusDouble(a, b);
78
}
79
80
double
81
J9::ArithEnv::doubleMultiplyDouble(double a, double b)
82
{
83
return helperCDoubleMultiplyDouble(a, b);
84
}
85
86
double
87
J9::ArithEnv::doubleDivideDouble(double a, double b)
88
{
89
return helperCDoubleDivideDouble(a, b);
90
}
91
double
92
J9::ArithEnv::doubleRemainderDouble(double a, double b)
93
{
94
return helperCDoubleRemainderDouble(a, b);
95
}
96
97
double
98
J9::ArithEnv::doubleNegate(double a)
99
{
100
double c;
101
helperNegateDouble(&a, &c);
102
return c;
103
}
104
105
double
106
J9::ArithEnv::floatToDouble(float a)
107
{
108
return helperCConvertFloatToDouble(a);
109
}
110
111
float
112
J9::ArithEnv::doubleToFloat(double a)
113
{
114
return helperCConvertDoubleToFloat(a);
115
}
116
117
int64_t
118
J9::ArithEnv::longRemainderLong(int64_t a, int64_t b)
119
{
120
return helperCLongRemainderLong(a, b);
121
}
122
123
int64_t
124
J9::ArithEnv::longDivideLong(int64_t a, int64_t b)
125
{
126
return helperCLongDivideLong(a, b);
127
}
128
129
int64_t
130
J9::ArithEnv::longMultiplyLong(int64_t a, int64_t b)
131
{
132
return helperCLongMultiplyLong(a, b);
133
}
134
135