1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_LIST_H_
18 #define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_LIST_H_
19 
20 // All quick entrypoints. Format is name, return type, argument types.
21 
22 #define QUICK_ENTRYPOINT_LIST(V) \
23   V(AllocArrayResolved, void*, mirror::Class*, int32_t) \
24   V(AllocArrayResolved8, void*, mirror::Class*, int32_t) \
25   V(AllocArrayResolved16, void*, mirror::Class*, int32_t) \
26   V(AllocArrayResolved32, void*, mirror::Class*, int32_t) \
27   V(AllocArrayResolved64, void*, mirror::Class*, int32_t) \
28   V(AllocObjectResolved, void*, mirror::Class*) \
29   V(AllocObjectInitialized, void*, mirror::Class*) \
30   V(AllocObjectWithChecks, void*, mirror::Class*) \
31   /* NB Class argument is purely to match the ABI of the other object alloc entrypoints. It is */ \
32   /*    not actually used for anything. */ \
33   V(AllocStringObject, void*, mirror::Class*) \
34   V(AllocStringFromBytes, void*, void*, int32_t, int32_t, int32_t) \
35   V(AllocStringFromChars, void*, int32_t, int32_t, void*) \
36   V(AllocStringFromString, void*, void*) \
37 \
38   V(InstanceofNonTrivial, size_t, mirror::Object*, mirror::Class*) \
39   V(CheckInstanceOf, void, mirror::Object*, mirror::Class*) \
40 \
41   V(InitializeStaticStorage, void*, mirror::Class*) \
42   V(ResolveTypeAndVerifyAccess, void*, uint32_t) \
43   V(ResolveType, void*, uint32_t) \
44   V(ResolveMethodHandle, void*, uint32_t) \
45   V(ResolveMethodType, void*, uint32_t) \
46   V(ResolveString, void*, uint32_t) \
47 \
48   V(Set8Instance, int, uint32_t, void*, int8_t) \
49   V(Set8Static, int, uint32_t, int8_t) \
50   V(Set16Instance, int, uint32_t, void*, int16_t) \
51   V(Set16Static, int, uint32_t, int16_t) \
52   V(Set32Instance, int, uint32_t, void*, int32_t) \
53   V(Set32Static, int, uint32_t, int32_t) \
54   V(Set64Instance, int, uint32_t, void*, int64_t) \
55   V(Set64Static, int, uint32_t, int64_t) \
56   V(SetObjInstance, int, uint32_t, void*, void*) \
57   V(SetObjStatic, int, uint32_t, void*) \
58   V(GetByteInstance, ssize_t, uint32_t, void*) \
59   V(GetBooleanInstance, size_t, uint32_t, void*) \
60   V(GetByteStatic, ssize_t, uint32_t) \
61   V(GetBooleanStatic, size_t, uint32_t) \
62   V(GetShortInstance, ssize_t, uint32_t, void*) \
63   V(GetCharInstance, size_t, uint32_t, void*) \
64   V(GetShortStatic, ssize_t, uint32_t) \
65   V(GetCharStatic, size_t, uint32_t) \
66   V(Get32Instance, ssize_t, uint32_t, void*) \
67   V(Get32Static, ssize_t, uint32_t) \
68   V(Get64Instance, int64_t, uint32_t, void*) \
69   V(Get64Static, int64_t, uint32_t) \
70   V(GetObjInstance, void*, uint32_t, void*) \
71   V(GetObjStatic, void*, uint32_t) \
72 \
73   V(AputObject, void, mirror::Array*, int32_t, mirror::Object*) \
74 \
75   V(JniMethodStart, uint32_t, Thread*) \
76   V(JniMethodFastStart, uint32_t, Thread*) \
77   V(JniMethodStartSynchronized, uint32_t, jobject, Thread*) \
78   V(JniMethodEnd, void, uint32_t, Thread*) \
79   V(JniMethodFastEnd, void, uint32_t, Thread*) \
80   V(JniMethodEndSynchronized, void, uint32_t, jobject, Thread*) \
81   V(JniMethodEndWithReference, mirror::Object*, jobject, uint32_t, Thread*) \
82   V(JniMethodFastEndWithReference, mirror::Object*, jobject, uint32_t, Thread*) \
83   V(JniMethodEndWithReferenceSynchronized, mirror::Object*, jobject, uint32_t, jobject, Thread*) \
84   V(QuickGenericJniTrampoline, void, ArtMethod*) \
85 \
86   V(LockObject, void, mirror::Object*) \
87   V(UnlockObject, void, mirror::Object*) \
88 \
89   V(CmpgDouble, int32_t, double, double) \
90   V(CmpgFloat, int32_t, float, float) \
91   V(CmplDouble, int32_t, double, double) \
92   V(CmplFloat, int32_t, float, float) \
93   V(Cos, double, double) \
94   V(Sin, double, double) \
95   V(Acos, double, double) \
96   V(Asin, double, double) \
97   V(Atan, double, double) \
98   V(Atan2, double, double, double) \
99   V(Pow, double, double, double) \
100   V(Cbrt, double, double) \
101   V(Cosh, double, double) \
102   V(Exp, double, double) \
103   V(Expm1, double, double) \
104   V(Hypot, double, double, double) \
105   V(Log, double, double) \
106   V(Log10, double, double) \
107   V(NextAfter, double, double, double) \
108   V(Sinh, double, double) \
109   V(Tan, double, double) \
110   V(Tanh, double, double) \
111   V(Fmod, double, double, double) \
112   V(L2d, double, int64_t) \
113   V(Fmodf, float, float, float) \
114   V(L2f, float, int64_t) \
115   V(D2iz, int32_t, double) \
116   V(F2iz, int32_t, float) \
117   V(Idivmod, int32_t, int32_t, int32_t) \
118   V(D2l, int64_t, double) \
119   V(F2l, int64_t, float) \
120   V(Ldiv, int64_t, int64_t, int64_t) \
121   V(Lmod, int64_t, int64_t, int64_t) \
122   V(Lmul, int64_t, int64_t, int64_t) \
123   V(ShlLong, uint64_t, uint64_t, uint32_t) \
124   V(ShrLong, uint64_t, uint64_t, uint32_t) \
125   V(UshrLong, uint64_t, uint64_t, uint32_t) \
126 \
127   V(IndexOf, int32_t, void*, uint32_t, uint32_t) \
128   V(StringCompareTo, int32_t, void*, void*) \
129   V(Memcpy, void*, void*, const void*, size_t) \
130 \
131   V(QuickImtConflictTrampoline, void, ArtMethod*) \
132   V(QuickResolutionTrampoline, void, ArtMethod*) \
133   V(QuickToInterpreterBridge, void, ArtMethod*) \
134   V(InvokeDirectTrampolineWithAccessCheck, void, uint32_t, void*) \
135   V(InvokeInterfaceTrampolineWithAccessCheck, void, uint32_t, void*) \
136   V(InvokeStaticTrampolineWithAccessCheck, void, uint32_t, void*) \
137   V(InvokeSuperTrampolineWithAccessCheck, void, uint32_t, void*) \
138   V(InvokeVirtualTrampolineWithAccessCheck, void, uint32_t, void*) \
139   V(InvokePolymorphic, void, uint32_t, void*) \
140   V(InvokeCustom, void, uint32_t, void*) \
141 \
142   V(TestSuspend, void, void) \
143 \
144   V(DeliverException, void, mirror::Object*) \
145   V(ThrowArrayBounds, void, int32_t, int32_t) \
146   V(ThrowDivZero, void, void) \
147   V(ThrowNullPointer, void, void) \
148   V(ThrowStackOverflow, void, void*) \
149   V(ThrowStringBounds, void, int32_t, int32_t) \
150   V(Deoptimize, void, DeoptimizationKind) \
151 \
152   V(A64Load, int64_t, volatile const int64_t *) \
153   V(A64Store, void, volatile int64_t *, int64_t) \
154 \
155   V(NewEmptyString, void, void) \
156   V(NewStringFromBytes_B, void, void) \
157   V(NewStringFromBytes_BI, void, void) \
158   V(NewStringFromBytes_BII, void, void) \
159   V(NewStringFromBytes_BIII, void, void) \
160   V(NewStringFromBytes_BIIString, void, void) \
161   V(NewStringFromBytes_BString, void, void) \
162   V(NewStringFromBytes_BIICharset, void, void) \
163   V(NewStringFromBytes_BCharset, void, void) \
164   V(NewStringFromChars_C, void, void) \
165   V(NewStringFromChars_CII, void, void) \
166   V(NewStringFromChars_IIC, void, void) \
167   V(NewStringFromCodePoints, void, void) \
168   V(NewStringFromString, void, void) \
169   V(NewStringFromStringBuffer, void, void) \
170   V(NewStringFromStringBuilder, void, void) \
171 \
172   V(StringBuilderAppend, void*, uint32_t) \
173 \
174   V(UpdateInlineCache, void, void) \
175   V(CompileOptimized, void, ArtMethod*, Thread*) \
176 \
177   V(ReadBarrierJni, void, mirror::CompressedReference<mirror::Object>*, Thread*) \
178   V(ReadBarrierMarkReg00, mirror::Object*, mirror::Object*) \
179   V(ReadBarrierMarkReg01, mirror::Object*, mirror::Object*) \
180   V(ReadBarrierMarkReg02, mirror::Object*, mirror::Object*) \
181   V(ReadBarrierMarkReg03, mirror::Object*, mirror::Object*) \
182   V(ReadBarrierMarkReg04, mirror::Object*, mirror::Object*) \
183   V(ReadBarrierMarkReg05, mirror::Object*, mirror::Object*) \
184   V(ReadBarrierMarkReg06, mirror::Object*, mirror::Object*) \
185   V(ReadBarrierMarkReg07, mirror::Object*, mirror::Object*) \
186   V(ReadBarrierMarkReg08, mirror::Object*, mirror::Object*) \
187   V(ReadBarrierMarkReg09, mirror::Object*, mirror::Object*) \
188   V(ReadBarrierMarkReg10, mirror::Object*, mirror::Object*) \
189   V(ReadBarrierMarkReg11, mirror::Object*, mirror::Object*) \
190   V(ReadBarrierMarkReg12, mirror::Object*, mirror::Object*) \
191   V(ReadBarrierMarkReg13, mirror::Object*, mirror::Object*) \
192   V(ReadBarrierMarkReg14, mirror::Object*, mirror::Object*) \
193   V(ReadBarrierMarkReg15, mirror::Object*, mirror::Object*) \
194   V(ReadBarrierMarkReg16, mirror::Object*, mirror::Object*) \
195   V(ReadBarrierMarkReg17, mirror::Object*, mirror::Object*) \
196   V(ReadBarrierMarkReg18, mirror::Object*, mirror::Object*) \
197   V(ReadBarrierMarkReg19, mirror::Object*, mirror::Object*) \
198   V(ReadBarrierMarkReg20, mirror::Object*, mirror::Object*) \
199   V(ReadBarrierMarkReg21, mirror::Object*, mirror::Object*) \
200   V(ReadBarrierMarkReg22, mirror::Object*, mirror::Object*) \
201   V(ReadBarrierMarkReg23, mirror::Object*, mirror::Object*) \
202   V(ReadBarrierMarkReg24, mirror::Object*, mirror::Object*) \
203   V(ReadBarrierMarkReg25, mirror::Object*, mirror::Object*) \
204   V(ReadBarrierMarkReg26, mirror::Object*, mirror::Object*) \
205   V(ReadBarrierMarkReg27, mirror::Object*, mirror::Object*) \
206   V(ReadBarrierMarkReg28, mirror::Object*, mirror::Object*) \
207   V(ReadBarrierMarkReg29, mirror::Object*, mirror::Object*) \
208   V(ReadBarrierSlow, mirror::Object*, mirror::Object*, mirror::Object*, uint32_t) \
209   V(ReadBarrierForRootSlow, mirror::Object*, GcRoot<mirror::Object>*) \
210 \
211 
212 #endif  // ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_LIST_H_
213 #undef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ENTRYPOINTS_LIST_H_   // #define is only for lint.
214