blob: 59421dd8b952a711a4a1cc3d514b568439f049d9 [file] [log] [blame]
Ian Rogers7655f292013-07-29 11:07:13 -07001/*
2 * Copyright (C) 2012 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
Ian Rogers6f3dbba2014-10-14 17:41:57 -070017#include "atomic.h"
Mingyao Yang98d1cc82014-05-15 17:02:16 -070018#include "entrypoints/jni/jni_entrypoints.h"
Mathieu Chartierd8891782014-03-02 13:28:37 -080019#include "entrypoints/quick/quick_alloc_entrypoints.h"
Andreas Gampee1794562014-11-04 22:26:32 -080020#include "entrypoints/quick/quick_default_externs.h"
Ian Rogers7655f292013-07-29 11:07:13 -070021#include "entrypoints/quick/quick_entrypoints.h"
22#include "entrypoints/entrypoint_utils.h"
23#include "entrypoints/math_entrypoints.h"
Ian Rogers6f3dbba2014-10-14 17:41:57 -070024#include "entrypoints/runtime_asm_entrypoints.h"
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010025#include "entrypoints_direct_mips.h"
Ian Rogers6f3dbba2014-10-14 17:41:57 -070026#include "interpreter/interpreter.h"
Ian Rogers7655f292013-07-29 11:07:13 -070027
28namespace art {
29
Ian Rogers7655f292013-07-29 11:07:13 -070030// Cast entrypoints.
31extern "C" uint32_t artIsAssignableFromCode(const mirror::Class* klass,
32 const mirror::Class* ref_class);
Ian Rogers7655f292013-07-29 11:07:13 -070033
34// Math entrypoints.
35extern int32_t CmpgDouble(double a, double b);
36extern int32_t CmplDouble(double a, double b);
37extern int32_t CmpgFloat(float a, float b);
38extern int32_t CmplFloat(float a, float b);
Ian Rogersa9a82542013-10-04 11:17:26 -070039extern "C" int64_t artLmul(int64_t a, int64_t b);
40extern "C" int64_t artLdiv(int64_t a, int64_t b);
41extern "C" int64_t artLmod(int64_t a, int64_t b);
Ian Rogers7655f292013-07-29 11:07:13 -070042
43// Math conversions.
44extern "C" int32_t __fixsfsi(float op1); // FLOAT_TO_INT
45extern "C" int32_t __fixdfsi(double op1); // DOUBLE_TO_INT
46extern "C" float __floatdisf(int64_t op1); // LONG_TO_FLOAT
47extern "C" double __floatdidf(int64_t op1); // LONG_TO_DOUBLE
48extern "C" int64_t __fixsfdi(float op1); // FLOAT_TO_LONG
49extern "C" int64_t __fixdfdi(double op1); // DOUBLE_TO_LONG
50
51// Single-precision FP arithmetics.
52extern "C" float fmodf(float a, float b); // REM_FLOAT[_2ADDR]
53
54// Double-precision FP arithmetics.
55extern "C" double fmod(double a, double b); // REM_DOUBLE[_2ADDR]
56
57// Long long arithmetics - REM_LONG[_2ADDR] and DIV_LONG[_2ADDR]
58extern "C" int64_t __divdi3(int64_t, int64_t);
59extern "C" int64_t __moddi3(int64_t, int64_t);
Hiroshi Yamauchi3b4c1892013-09-12 21:33:12 -070060
Andreas Gampe3cfa4d02015-10-06 17:04:01 -070061void InitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) {
Ian Rogers848871b2013-08-05 10:56:33 -070062 // JNI
63 jpoints->pDlsymLookup = art_jni_dlsym_lookup_stub;
64
Ian Rogers7655f292013-07-29 11:07:13 -070065 // Alloc
Hiroshi Yamauchi3b4c1892013-09-12 21:33:12 -070066 ResetQuickAllocEntryPoints(qpoints);
Ian Rogers7655f292013-07-29 11:07:13 -070067
68 // Cast
Ian Rogers848871b2013-08-05 10:56:33 -070069 qpoints->pInstanceofNonTrivial = artIsAssignableFromCode;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010070 static_assert(IsDirectEntrypoint(kQuickInstanceofNonTrivial), "Direct C stub not marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070071 qpoints->pCheckCast = art_quick_check_cast;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010072 static_assert(!IsDirectEntrypoint(kQuickCheckCast), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -070073
74 // DexCache
Ian Rogers848871b2013-08-05 10:56:33 -070075 qpoints->pInitializeStaticStorage = art_quick_initialize_static_storage;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010076 static_assert(!IsDirectEntrypoint(kQuickInitializeStaticStorage),
77 "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070078 qpoints->pInitializeTypeAndVerifyAccess = art_quick_initialize_type_and_verify_access;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010079 static_assert(!IsDirectEntrypoint(kQuickInitializeTypeAndVerifyAccess),
80 "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070081 qpoints->pInitializeType = art_quick_initialize_type;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010082 static_assert(!IsDirectEntrypoint(kQuickInitializeType), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070083 qpoints->pResolveString = art_quick_resolve_string;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010084 static_assert(!IsDirectEntrypoint(kQuickResolveString), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -070085
86 // Field
Fred Shih37f05ef2014-07-16 18:38:08 -070087 qpoints->pSet8Instance = art_quick_set8_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010088 static_assert(!IsDirectEntrypoint(kQuickSet8Instance), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -070089 qpoints->pSet8Static = art_quick_set8_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010090 static_assert(!IsDirectEntrypoint(kQuickSet8Static), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -070091 qpoints->pSet16Instance = art_quick_set16_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010092 static_assert(!IsDirectEntrypoint(kQuickSet16Instance), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -070093 qpoints->pSet16Static = art_quick_set16_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010094 static_assert(!IsDirectEntrypoint(kQuickSet16Static), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070095 qpoints->pSet32Instance = art_quick_set32_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010096 static_assert(!IsDirectEntrypoint(kQuickSet32Instance), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070097 qpoints->pSet32Static = art_quick_set32_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +010098 static_assert(!IsDirectEntrypoint(kQuickSet32Static), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -070099 qpoints->pSet64Instance = art_quick_set64_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100100 static_assert(!IsDirectEntrypoint(kQuickSet64Instance), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700101 qpoints->pSet64Static = art_quick_set64_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100102 static_assert(!IsDirectEntrypoint(kQuickSet64Static), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700103 qpoints->pSetObjInstance = art_quick_set_obj_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100104 static_assert(!IsDirectEntrypoint(kQuickSetObjInstance), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700105 qpoints->pSetObjStatic = art_quick_set_obj_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100106 static_assert(!IsDirectEntrypoint(kQuickSetObjStatic), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700107 qpoints->pGetBooleanInstance = art_quick_get_boolean_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100108 static_assert(!IsDirectEntrypoint(kQuickGetBooleanInstance), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700109 qpoints->pGetByteInstance = art_quick_get_byte_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100110 static_assert(!IsDirectEntrypoint(kQuickGetByteInstance), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700111 qpoints->pGetCharInstance = art_quick_get_char_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100112 static_assert(!IsDirectEntrypoint(kQuickGetCharInstance), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700113 qpoints->pGetShortInstance = art_quick_get_short_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100114 static_assert(!IsDirectEntrypoint(kQuickGetShortInstance), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700115 qpoints->pGet32Instance = art_quick_get32_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100116 static_assert(!IsDirectEntrypoint(kQuickGet32Instance), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700117 qpoints->pGet64Instance = art_quick_get64_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100118 static_assert(!IsDirectEntrypoint(kQuickGet64Instance), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700119 qpoints->pGetObjInstance = art_quick_get_obj_instance;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100120 static_assert(!IsDirectEntrypoint(kQuickGetObjInstance), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700121 qpoints->pGetBooleanStatic = art_quick_get_boolean_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100122 static_assert(!IsDirectEntrypoint(kQuickGetBooleanStatic), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700123 qpoints->pGetByteStatic = art_quick_get_byte_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100124 static_assert(!IsDirectEntrypoint(kQuickGetByteStatic), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700125 qpoints->pGetCharStatic = art_quick_get_char_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100126 static_assert(!IsDirectEntrypoint(kQuickGetCharStatic), "Non-direct C stub marked direct.");
Fred Shih37f05ef2014-07-16 18:38:08 -0700127 qpoints->pGetShortStatic = art_quick_get_short_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100128 static_assert(!IsDirectEntrypoint(kQuickGetShortStatic), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700129 qpoints->pGet32Static = art_quick_get32_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100130 static_assert(!IsDirectEntrypoint(kQuickGet32Static), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700131 qpoints->pGet64Static = art_quick_get64_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100132 static_assert(!IsDirectEntrypoint(kQuickGet64Static), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700133 qpoints->pGetObjStatic = art_quick_get_obj_static;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100134 static_assert(!IsDirectEntrypoint(kQuickGetObjStatic), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700135
Ian Rogersa9a82542013-10-04 11:17:26 -0700136 // Array
137 qpoints->pAputObjectWithNullAndBoundCheck = art_quick_aput_obj_with_null_and_bound_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100138 static_assert(!IsDirectEntrypoint(kQuickAputObjectWithNullAndBoundCheck),
139 "Non-direct C stub marked direct.");
Ian Rogersa9a82542013-10-04 11:17:26 -0700140 qpoints->pAputObjectWithBoundCheck = art_quick_aput_obj_with_bound_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100141 static_assert(!IsDirectEntrypoint(kQuickAputObjectWithBoundCheck),
142 "Non-direct C stub marked direct.");
Ian Rogersa9a82542013-10-04 11:17:26 -0700143 qpoints->pAputObject = art_quick_aput_obj;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100144 static_assert(!IsDirectEntrypoint(kQuickAputObject), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700145 qpoints->pHandleFillArrayData = art_quick_handle_fill_data;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100146 static_assert(!IsDirectEntrypoint(kQuickHandleFillArrayData), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700147
148 // JNI
149 qpoints->pJniMethodStart = JniMethodStart;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100150 static_assert(!IsDirectEntrypoint(kQuickJniMethodStart), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700151 qpoints->pJniMethodStartSynchronized = JniMethodStartSynchronized;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100152 static_assert(!IsDirectEntrypoint(kQuickJniMethodStartSynchronized),
153 "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700154 qpoints->pJniMethodEnd = JniMethodEnd;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100155 static_assert(!IsDirectEntrypoint(kQuickJniMethodEnd), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700156 qpoints->pJniMethodEndSynchronized = JniMethodEndSynchronized;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100157 static_assert(!IsDirectEntrypoint(kQuickJniMethodEndSynchronized),
158 "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700159 qpoints->pJniMethodEndWithReference = JniMethodEndWithReference;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100160 static_assert(!IsDirectEntrypoint(kQuickJniMethodEndWithReference),
161 "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700162 qpoints->pJniMethodEndWithReferenceSynchronized = JniMethodEndWithReferenceSynchronized;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100163 static_assert(!IsDirectEntrypoint(kQuickJniMethodEndWithReferenceSynchronized),
164 "Non-direct C stub marked direct.");
Andreas Gampe2da88232014-02-27 12:26:20 -0800165 qpoints->pQuickGenericJniTrampoline = art_quick_generic_jni_trampoline;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100166 static_assert(!IsDirectEntrypoint(kQuickQuickGenericJniTrampoline),
167 "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700168
169 // Locks
Ian Rogers848871b2013-08-05 10:56:33 -0700170 qpoints->pLockObject = art_quick_lock_object;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100171 static_assert(!IsDirectEntrypoint(kQuickLockObject), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700172 qpoints->pUnlockObject = art_quick_unlock_object;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100173 static_assert(!IsDirectEntrypoint(kQuickUnlockObject), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700174
175 // Math
176 qpoints->pCmpgDouble = CmpgDouble;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100177 static_assert(IsDirectEntrypoint(kQuickCmpgDouble), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700178 qpoints->pCmpgFloat = CmpgFloat;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100179 static_assert(IsDirectEntrypoint(kQuickCmpgFloat), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700180 qpoints->pCmplDouble = CmplDouble;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100181 static_assert(IsDirectEntrypoint(kQuickCmplDouble), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700182 qpoints->pCmplFloat = CmplFloat;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100183 static_assert(IsDirectEntrypoint(kQuickCmplFloat), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700184 qpoints->pFmod = fmod;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100185 static_assert(IsDirectEntrypoint(kQuickFmod), "Direct C stub not marked direct.");
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700186 qpoints->pL2d = art_l2d;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100187 static_assert(IsDirectEntrypoint(kQuickL2d), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700188 qpoints->pFmodf = fmodf;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100189 static_assert(IsDirectEntrypoint(kQuickFmodf), "Direct C stub not marked direct.");
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700190 qpoints->pL2f = art_l2f;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100191 static_assert(IsDirectEntrypoint(kQuickL2f), "Direct C stub not marked direct.");
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700192 qpoints->pD2iz = art_d2i;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100193 static_assert(IsDirectEntrypoint(kQuickD2iz), "Direct C stub not marked direct.");
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700194 qpoints->pF2iz = art_f2i;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100195 static_assert(IsDirectEntrypoint(kQuickF2iz), "Direct C stub not marked direct.");
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700196 qpoints->pIdivmod = nullptr;
Ian Rogers7655f292013-07-29 11:07:13 -0700197 qpoints->pD2l = art_d2l;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100198 static_assert(IsDirectEntrypoint(kQuickD2l), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700199 qpoints->pF2l = art_f2l;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100200 static_assert(IsDirectEntrypoint(kQuickF2l), "Direct C stub not marked direct.");
Ian Rogersa9a82542013-10-04 11:17:26 -0700201 qpoints->pLdiv = artLdiv;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100202 static_assert(IsDirectEntrypoint(kQuickLdiv), "Direct C stub not marked direct.");
Ian Rogersa9a82542013-10-04 11:17:26 -0700203 qpoints->pLmod = artLmod;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100204 static_assert(IsDirectEntrypoint(kQuickLmod), "Direct C stub not marked direct.");
Ian Rogersa9a82542013-10-04 11:17:26 -0700205 qpoints->pLmul = artLmul;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100206 static_assert(IsDirectEntrypoint(kQuickLmul), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700207 qpoints->pShlLong = art_quick_shl_long;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100208 static_assert(!IsDirectEntrypoint(kQuickShlLong), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700209 qpoints->pShrLong = art_quick_shr_long;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100210 static_assert(!IsDirectEntrypoint(kQuickShrLong), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700211 qpoints->pUshrLong = art_quick_ushr_long;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100212 static_assert(!IsDirectEntrypoint(kQuickUshrLong), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700213
Ian Rogers7655f292013-07-29 11:07:13 -0700214 // Intrinsics
215 qpoints->pIndexOf = art_quick_indexof;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100216 static_assert(!IsDirectEntrypoint(kQuickIndexOf), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700217 qpoints->pStringCompareTo = art_quick_string_compareto;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100218 static_assert(!IsDirectEntrypoint(kQuickStringCompareTo), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700219 qpoints->pMemcpy = memcpy;
220
221 // Invocation
Jeff Hao88474b42013-10-23 16:24:40 -0700222 qpoints->pQuickImtConflictTrampoline = art_quick_imt_conflict_trampoline;
Ian Rogers848871b2013-08-05 10:56:33 -0700223 qpoints->pQuickResolutionTrampoline = art_quick_resolution_trampoline;
224 qpoints->pQuickToInterpreterBridge = art_quick_to_interpreter_bridge;
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700225 qpoints->pInvokeDirectTrampolineWithAccessCheck =
226 art_quick_invoke_direct_trampoline_with_access_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100227 static_assert(!IsDirectEntrypoint(kQuickInvokeDirectTrampolineWithAccessCheck),
228 "Non-direct C stub marked direct.");
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700229 qpoints->pInvokeInterfaceTrampolineWithAccessCheck =
230 art_quick_invoke_interface_trampoline_with_access_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100231 static_assert(!IsDirectEntrypoint(kQuickInvokeInterfaceTrampolineWithAccessCheck),
232 "Non-direct C stub marked direct.");
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700233 qpoints->pInvokeStaticTrampolineWithAccessCheck =
234 art_quick_invoke_static_trampoline_with_access_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100235 static_assert(!IsDirectEntrypoint(kQuickInvokeStaticTrampolineWithAccessCheck),
236 "Non-direct C stub marked direct.");
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700237 qpoints->pInvokeSuperTrampolineWithAccessCheck =
238 art_quick_invoke_super_trampoline_with_access_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100239 static_assert(!IsDirectEntrypoint(kQuickInvokeSuperTrampolineWithAccessCheck),
240 "Non-direct C stub marked direct.");
Mathieu Chartier2cebb242015-04-21 16:50:40 -0700241 qpoints->pInvokeVirtualTrampolineWithAccessCheck =
242 art_quick_invoke_virtual_trampoline_with_access_check;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100243 static_assert(!IsDirectEntrypoint(kQuickInvokeVirtualTrampolineWithAccessCheck),
244 "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700245
246 // Thread
Ian Rogers848871b2013-08-05 10:56:33 -0700247 qpoints->pTestSuspend = art_quick_test_suspend;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100248 static_assert(!IsDirectEntrypoint(kQuickTestSuspend), "Non-direct C stub marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700249
250 // Throws
Ian Rogers848871b2013-08-05 10:56:33 -0700251 qpoints->pDeliverException = art_quick_deliver_exception;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100252 static_assert(!IsDirectEntrypoint(kQuickDeliverException), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700253 qpoints->pThrowArrayBounds = art_quick_throw_array_bounds;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100254 static_assert(!IsDirectEntrypoint(kQuickThrowArrayBounds), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700255 qpoints->pThrowDivZero = art_quick_throw_div_zero;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100256 static_assert(!IsDirectEntrypoint(kQuickThrowDivZero), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700257 qpoints->pThrowNoSuchMethod = art_quick_throw_no_such_method;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100258 static_assert(!IsDirectEntrypoint(kQuickThrowNoSuchMethod), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700259 qpoints->pThrowNullPointer = art_quick_throw_null_pointer_exception;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100260 static_assert(!IsDirectEntrypoint(kQuickThrowNullPointer), "Non-direct C stub marked direct.");
Ian Rogers848871b2013-08-05 10:56:33 -0700261 qpoints->pThrowStackOverflow = art_quick_throw_stack_overflow;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100262 static_assert(!IsDirectEntrypoint(kQuickThrowStackOverflow), "Non-direct C stub marked direct.");
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700263
Sebastien Hertz07474662015-08-25 15:12:33 +0000264 // Deoptimization from compiled code.
265 qpoints->pDeoptimize = art_quick_deoptimize_from_compiled_code;
Douglas Leung2e8bf552015-07-07 17:27:34 -0700266 static_assert(!IsDirectEntrypoint(kQuickDeoptimize), "Non-direct C stub marked direct.");
267
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700268 // Atomic 64-bit load/store
269 qpoints->pA64Load = QuasiAtomic::Read64;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100270 static_assert(IsDirectEntrypoint(kQuickA64Load), "Non-direct C stub marked direct.");
Douglas Leungd9cb8ae2014-07-09 14:28:35 -0700271 qpoints->pA64Store = QuasiAtomic::Write64;
Nikola Veljkovic2d873b62015-02-20 17:21:15 +0100272 static_assert(IsDirectEntrypoint(kQuickA64Store), "Non-direct C stub marked direct.");
Hiroshi Yamauchi1cc71eb2015-05-07 10:47:27 -0700273
274 qpoints->pReadBarrierJni = ReadBarrierJni;
275 static_assert(!IsDirectEntrypoint(kQuickReadBarrierJni), "Non-direct C stub marked direct.");
Man Cao1aee9002015-07-14 22:31:42 -0700276 qpoints->pReadBarrierSlow = artReadBarrierSlow;
277 static_assert(IsDirectEntrypoint(kQuickReadBarrierSlow), "Direct C stub not marked direct.");
Ian Rogers7655f292013-07-29 11:07:13 -0700278};
279
280} // namespace art