Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/compiler/intrinsics/bmi/Expr.java
41155 views
1
/*
2
* Copyright (c) 2014, 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
package compiler.intrinsics.bmi;
25
26
/**
27
* Expression that should be replaced by particular instrinsic
28
* or intruction during compilation.
29
*/
30
public abstract class Expr {
31
32
public static class MemI {
33
public MemI(int i) {
34
this.value = i;
35
}
36
37
public int value;
38
}
39
40
public static class MemL {
41
public MemL(long l) {
42
this.value = l;
43
}
44
45
public long value;
46
}
47
48
public boolean isUnaryArgumentSupported() {
49
return false;
50
}
51
52
public boolean isIntExprSupported() {
53
return false;
54
}
55
56
public boolean isBinaryArgumentSupported() {
57
return false;
58
}
59
60
public boolean isLongExprSupported() {
61
return false;
62
}
63
64
public boolean isIntToLongExprSupported() {
65
return false;
66
}
67
68
public boolean isMemExprSupported() {
69
return false;
70
}
71
72
public int intExpr(int reg) {
73
throw new UnsupportedOperationException();
74
}
75
76
public int intExpr(MemI mem) {
77
throw new UnsupportedOperationException();
78
}
79
80
public int intExpr(int a, int b) {
81
throw new UnsupportedOperationException();
82
}
83
84
public int intExpr(int a, MemI b) {
85
throw new UnsupportedOperationException();
86
}
87
88
public int intExpr(MemI a, int b) {
89
throw new UnsupportedOperationException();
90
}
91
92
public int intExpr(MemI a, MemI b) {
93
throw new UnsupportedOperationException();
94
}
95
96
public long longExpr(long reg) {
97
throw new UnsupportedOperationException();
98
}
99
100
public long longExpr(MemL mem) {
101
throw new UnsupportedOperationException();
102
}
103
104
public long longExpr(long a, long b) {
105
throw new UnsupportedOperationException();
106
}
107
108
public long longExpr(long a, MemL b) {
109
throw new UnsupportedOperationException();
110
}
111
112
public long longExpr(MemL a, long b) {
113
throw new UnsupportedOperationException();
114
}
115
116
public long longExpr(MemL a, MemL b) {
117
throw new UnsupportedOperationException();
118
}
119
120
public long intToLongExpr(int reg) {
121
throw new UnsupportedOperationException();
122
}
123
124
public static class BMIExpr extends Expr {
125
126
public boolean isMemExprSupported() {
127
return true;
128
}
129
}
130
131
public static class BMIBinaryExpr extends BMIExpr {
132
133
public boolean isBinaryArgumentSupported() {
134
return true;
135
}
136
137
}
138
139
public static class BMIUnaryExpr extends BMIExpr {
140
public boolean isUnaryArgumentSupported() {
141
return true;
142
}
143
}
144
145
public static class BMIBinaryIntExpr extends BMIBinaryExpr {
146
public boolean isIntExprSupported() {
147
return true;
148
}
149
}
150
151
public static class BMIBinaryLongExpr extends BMIBinaryExpr {
152
public boolean isLongExprSupported() {
153
return true;
154
}
155
}
156
157
public static class BMIUnaryIntExpr extends BMIUnaryExpr {
158
public boolean isIntExprSupported() {
159
return true;
160
}
161
}
162
163
public static class BMIUnaryLongExpr extends BMIUnaryExpr {
164
public boolean isLongExprSupported() {
165
return true;
166
}
167
}
168
169
public static class BMIUnaryIntToLongExpr extends BMIUnaryExpr {
170
public boolean isIntToLongExprSupported() {
171
return true;
172
}
173
}
174
175
176
public static class BitCountingExpr extends Expr {
177
public boolean isUnaryArgumentSupported() {
178
return true;
179
}
180
}
181
182
public static class BitCountingIntExpr extends BitCountingExpr {
183
public boolean isIntExprSupported() {
184
return true;
185
}
186
}
187
188
public static class BitCountingLongExpr extends BitCountingExpr {
189
public boolean isLongExprSupported() {
190
return true;
191
}
192
}
193
}
194
195