blob: 1ef75855ab6cba3cdf4f288d548d975c21716e61 [file] [log] [blame]
Ian Rogers6f3dbba2014-10-14 17:41:57 -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
17#ifndef ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_
18#define ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_
19
Igor Murashkin457e8742015-10-22 17:37:50 -070020// Define entry points to assembly routines.
21// All extern "C" functions here are defined in a corresponding assembly-only file.
22// The exact file paths are runtime/arch/$ISA/quick_entrypoints_$ISA.s
23
Ian Rogers6f3dbba2014-10-14 17:41:57 -070024namespace art {
25
26#ifndef BUILDING_LIBART
27#error "File and symbols only for use within libart."
28#endif
29
30extern "C" void* art_jni_dlsym_lookup_stub(JNIEnv*, jobject);
31static inline const void* GetJniDlsymLookupStub() {
32 return reinterpret_cast<const void*>(art_jni_dlsym_lookup_stub);
33}
34
Ian Rogers6f3dbba2014-10-14 17:41:57 -070035// Return the address of quick stub code for handling IMT conflicts.
Mathieu Chartiere401d142015-04-22 13:56:20 -070036extern "C" void art_quick_imt_conflict_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070037static inline const void* GetQuickImtConflictStub() {
38 return reinterpret_cast<const void*>(art_quick_imt_conflict_trampoline);
39}
40
Ian Rogers6f3dbba2014-10-14 17:41:57 -070041// Return the address of quick stub code for bridging from quick code to the interpreter.
Mathieu Chartiere401d142015-04-22 13:56:20 -070042extern "C" void art_quick_to_interpreter_bridge(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070043static inline const void* GetQuickToInterpreterBridge() {
44 return reinterpret_cast<const void*>(art_quick_to_interpreter_bridge);
45}
46
Ian Rogers6f3dbba2014-10-14 17:41:57 -070047// Return the address of quick stub code for handling JNI calls.
Mathieu Chartiere401d142015-04-22 13:56:20 -070048extern "C" void art_quick_generic_jni_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070049static inline const void* GetQuickGenericJniStub() {
50 return reinterpret_cast<const void*>(art_quick_generic_jni_trampoline);
51}
52
Ian Rogers6f3dbba2014-10-14 17:41:57 -070053// Return the address of quick stub code for handling transitions into the proxy invoke handler.
54extern "C" void art_quick_proxy_invoke_handler();
55static inline const void* GetQuickProxyInvokeHandler() {
56 return reinterpret_cast<const void*>(art_quick_proxy_invoke_handler);
57}
58
Igor Murashkin457e8742015-10-22 17:37:50 -070059// Return the address of quick stub code for handling transitions into the lambda proxy
60// invoke handler.
61extern "C" void art_quick_lambda_proxy_invoke_handler();
62static inline const void* GetQuickLambdaProxyInvokeHandler() {
63 return reinterpret_cast<const void*>(art_quick_lambda_proxy_invoke_handler);
64}
65
Ian Rogers6f3dbba2014-10-14 17:41:57 -070066// Return the address of quick stub code for resolving a method at first call.
Mathieu Chartiere401d142015-04-22 13:56:20 -070067extern "C" void art_quick_resolution_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070068static inline const void* GetQuickResolutionStub() {
69 return reinterpret_cast<const void*>(art_quick_resolution_trampoline);
70}
71
72// Entry point for quick code that performs deoptimization.
73extern "C" void art_quick_deoptimize();
74static inline const void* GetQuickDeoptimizationEntryPoint() {
75 return reinterpret_cast<const void*>(art_quick_deoptimize);
76}
77
78// Return address of instrumentation entry point used by non-interpreter based tracing.
79extern "C" void art_quick_instrumentation_entry(void*);
80static inline const void* GetQuickInstrumentationEntryPoint() {
81 return reinterpret_cast<const void*>(art_quick_instrumentation_entry);
82}
83
Sebastien Hertz07474662015-08-25 15:12:33 +000084// Stub to deoptimize from compiled code.
85extern "C" void art_quick_deoptimize_from_compiled_code();
Mingyao Yangd43b3ac2015-04-01 14:03:04 -070086
Ian Rogers6f3dbba2014-10-14 17:41:57 -070087// The return_pc of instrumentation exit stub.
88extern "C" void art_quick_instrumentation_exit();
89static inline const void* GetQuickInstrumentationExitPc() {
90 return reinterpret_cast<const void*>(art_quick_instrumentation_exit);
91}
92
93} // namespace art
94
95#endif // ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_