blob: a4572f65a7bd2908711068bfb78fce9662971ed5 [file] [log] [blame]
Andreas Gampec7ed09b2016-04-25 20:08:55 -07001/*
2 * Copyright (C) 2016 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_DEFAULT_INIT_ENTRYPOINTS_H_
18#define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_
19
Andreas Gampe57943812017-12-06 21:39:13 -080020#include "base/logging.h" // FOR VLOG_IS_ON.
Andreas Gampec7ed09b2016-04-25 20:08:55 -070021#include "entrypoints/jni/jni_entrypoints.h"
22#include "entrypoints/runtime_asm_entrypoints.h"
23#include "quick_alloc_entrypoints.h"
24#include "quick_default_externs.h"
25#include "quick_entrypoints.h"
26
27namespace art {
28
Andreas Gampe8ea4eec2017-05-30 13:53:03 -070029static void DefaultInitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) {
Andreas Gampec7ed09b2016-04-25 20:08:55 -070030 // JNI
31 jpoints->pDlsymLookup = art_jni_dlsym_lookup_stub;
32
33 // Alloc
Mathieu Chartier5ace2012016-11-30 10:15:41 -080034 ResetQuickAllocEntryPoints(qpoints, /* is_marking */ true);
Andreas Gampec7ed09b2016-04-25 20:08:55 -070035
36 // DexCache
37 qpoints->pInitializeStaticStorage = art_quick_initialize_static_storage;
38 qpoints->pInitializeTypeAndVerifyAccess = art_quick_initialize_type_and_verify_access;
39 qpoints->pInitializeType = art_quick_initialize_type;
Orion Hodson18259d72018-04-12 11:18:23 +010040 qpoints->pResolveMethodType = art_quick_resolve_method_type;
Andreas Gampec7ed09b2016-04-25 20:08:55 -070041 qpoints->pResolveString = art_quick_resolve_string;
42
43 // Field
44 qpoints->pSet8Instance = art_quick_set8_instance;
45 qpoints->pSet8Static = art_quick_set8_static;
46 qpoints->pSet16Instance = art_quick_set16_instance;
47 qpoints->pSet16Static = art_quick_set16_static;
48 qpoints->pSet32Instance = art_quick_set32_instance;
49 qpoints->pSet32Static = art_quick_set32_static;
50 qpoints->pSet64Instance = art_quick_set64_instance;
51 qpoints->pSet64Static = art_quick_set64_static;
52 qpoints->pSetObjInstance = art_quick_set_obj_instance;
53 qpoints->pSetObjStatic = art_quick_set_obj_static;
54 qpoints->pGetByteInstance = art_quick_get_byte_instance;
55 qpoints->pGetBooleanInstance = art_quick_get_boolean_instance;
56 qpoints->pGetShortInstance = art_quick_get_short_instance;
57 qpoints->pGetCharInstance = art_quick_get_char_instance;
58 qpoints->pGet32Instance = art_quick_get32_instance;
59 qpoints->pGet64Instance = art_quick_get64_instance;
60 qpoints->pGetObjInstance = art_quick_get_obj_instance;
61 qpoints->pGetByteStatic = art_quick_get_byte_static;
62 qpoints->pGetBooleanStatic = art_quick_get_boolean_static;
63 qpoints->pGetShortStatic = art_quick_get_short_static;
64 qpoints->pGetCharStatic = art_quick_get_char_static;
65 qpoints->pGet32Static = art_quick_get32_static;
66 qpoints->pGet64Static = art_quick_get64_static;
67 qpoints->pGetObjStatic = art_quick_get_obj_static;
68
69 // Array
Andreas Gampec7ed09b2016-04-25 20:08:55 -070070 qpoints->pAputObject = art_quick_aput_obj;
Andreas Gampec7ed09b2016-04-25 20:08:55 -070071
72 // JNI
73 qpoints->pJniMethodStart = JniMethodStart;
Igor Murashkin9d4b6da2016-07-29 09:51:58 -070074 qpoints->pJniMethodFastStart = JniMethodFastStart;
Andreas Gampec7ed09b2016-04-25 20:08:55 -070075 qpoints->pJniMethodStartSynchronized = JniMethodStartSynchronized;
76 qpoints->pJniMethodEnd = JniMethodEnd;
77 qpoints->pJniMethodEndSynchronized = JniMethodEndSynchronized;
78 qpoints->pJniMethodEndWithReference = JniMethodEndWithReference;
Igor Murashkinaf1e2992016-10-12 17:44:50 -070079 qpoints->pJniMethodFastEndWithReference = JniMethodFastEndWithReference;
Andreas Gampec7ed09b2016-04-25 20:08:55 -070080 qpoints->pJniMethodEndWithReferenceSynchronized = JniMethodEndWithReferenceSynchronized;
Igor Murashkin9d4b6da2016-07-29 09:51:58 -070081 qpoints->pJniMethodFastEnd = JniMethodFastEnd;
Andreas Gampec7ed09b2016-04-25 20:08:55 -070082 qpoints->pQuickGenericJniTrampoline = art_quick_generic_jni_trampoline;
83
84 // Locks
85 if (UNLIKELY(VLOG_IS_ON(systrace_lock_logging))) {
86 qpoints->pLockObject = art_quick_lock_object_no_inline;
87 qpoints->pUnlockObject = art_quick_unlock_object_no_inline;
88 } else {
89 qpoints->pLockObject = art_quick_lock_object;
90 qpoints->pUnlockObject = art_quick_unlock_object;
91 }
92
93 // Invocation
94 qpoints->pQuickImtConflictTrampoline = art_quick_imt_conflict_trampoline;
95 qpoints->pQuickResolutionTrampoline = art_quick_resolution_trampoline;
96 qpoints->pQuickToInterpreterBridge = art_quick_to_interpreter_bridge;
97 qpoints->pInvokeDirectTrampolineWithAccessCheck =
98 art_quick_invoke_direct_trampoline_with_access_check;
99 qpoints->pInvokeInterfaceTrampolineWithAccessCheck =
100 art_quick_invoke_interface_trampoline_with_access_check;
101 qpoints->pInvokeStaticTrampolineWithAccessCheck =
102 art_quick_invoke_static_trampoline_with_access_check;
103 qpoints->pInvokeSuperTrampolineWithAccessCheck =
104 art_quick_invoke_super_trampoline_with_access_check;
105 qpoints->pInvokeVirtualTrampolineWithAccessCheck =
106 art_quick_invoke_virtual_trampoline_with_access_check;
Orion Hodsonac141392017-01-13 11:53:47 +0000107 qpoints->pInvokePolymorphic = art_quick_invoke_polymorphic;
Andreas Gampec7ed09b2016-04-25 20:08:55 -0700108
109 // Thread
110 qpoints->pTestSuspend = art_quick_test_suspend;
111
112 // Throws
113 qpoints->pDeliverException = art_quick_deliver_exception;
114 qpoints->pThrowArrayBounds = art_quick_throw_array_bounds;
115 qpoints->pThrowDivZero = art_quick_throw_div_zero;
Andreas Gampec7ed09b2016-04-25 20:08:55 -0700116 qpoints->pThrowNullPointer = art_quick_throw_null_pointer_exception;
117 qpoints->pThrowStackOverflow = art_quick_throw_stack_overflow;
Vladimir Marko87f3fcb2016-04-28 15:52:11 +0100118 qpoints->pThrowStringBounds = art_quick_throw_string_bounds;
Andreas Gampec7ed09b2016-04-25 20:08:55 -0700119
120 // Deoptimize
121 qpoints->pDeoptimize = art_quick_deoptimize_from_compiled_code;
Igor Murashkin2ffb7032017-11-08 13:35:21 -0800122}
Andreas Gampec7ed09b2016-04-25 20:08:55 -0700123
124} // namespace art
125
126#endif // ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_