blob: 2842c5a5a6a86e736bb098ab1ff0586bf1118a26 [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
20namespace art {
21
22#ifndef BUILDING_LIBART
23#error "File and symbols only for use within libart."
24#endif
25
26extern "C" void* art_jni_dlsym_lookup_stub(JNIEnv*, jobject);
27static inline const void* GetJniDlsymLookupStub() {
28 return reinterpret_cast<const void*>(art_jni_dlsym_lookup_stub);
29}
30
Ian Rogers6f3dbba2014-10-14 17:41:57 -070031// Return the address of quick stub code for handling IMT conflicts.
Mathieu Chartiere401d142015-04-22 13:56:20 -070032extern "C" void art_quick_imt_conflict_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070033static inline const void* GetQuickImtConflictStub() {
34 return reinterpret_cast<const void*>(art_quick_imt_conflict_trampoline);
35}
36
Ian Rogers6f3dbba2014-10-14 17:41:57 -070037// Return the address of quick stub code for bridging from quick code to the interpreter.
Mathieu Chartiere401d142015-04-22 13:56:20 -070038extern "C" void art_quick_to_interpreter_bridge(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070039static inline const void* GetQuickToInterpreterBridge() {
40 return reinterpret_cast<const void*>(art_quick_to_interpreter_bridge);
41}
42
Ian Rogers6f3dbba2014-10-14 17:41:57 -070043// Return the address of quick stub code for handling JNI calls.
Mathieu Chartiere401d142015-04-22 13:56:20 -070044extern "C" void art_quick_generic_jni_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070045static inline const void* GetQuickGenericJniStub() {
46 return reinterpret_cast<const void*>(art_quick_generic_jni_trampoline);
47}
48
Ian Rogers6f3dbba2014-10-14 17:41:57 -070049// Return the address of quick stub code for handling transitions into the proxy invoke handler.
50extern "C" void art_quick_proxy_invoke_handler();
51static inline const void* GetQuickProxyInvokeHandler() {
52 return reinterpret_cast<const void*>(art_quick_proxy_invoke_handler);
53}
54
Ian Rogers6f3dbba2014-10-14 17:41:57 -070055// Return the address of quick stub code for resolving a method at first call.
Mathieu Chartiere401d142015-04-22 13:56:20 -070056extern "C" void art_quick_resolution_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070057static inline const void* GetQuickResolutionStub() {
58 return reinterpret_cast<const void*>(art_quick_resolution_trampoline);
59}
60
61// Entry point for quick code that performs deoptimization.
62extern "C" void art_quick_deoptimize();
63static inline const void* GetQuickDeoptimizationEntryPoint() {
64 return reinterpret_cast<const void*>(art_quick_deoptimize);
65}
66
67// Return address of instrumentation entry point used by non-interpreter based tracing.
68extern "C" void art_quick_instrumentation_entry(void*);
69static inline const void* GetQuickInstrumentationEntryPoint() {
70 return reinterpret_cast<const void*>(art_quick_instrumentation_entry);
71}
72
Sebastien Hertz07474662015-08-25 15:12:33 +000073// Stub to deoptimize from compiled code.
74extern "C" void art_quick_deoptimize_from_compiled_code();
Mingyao Yangd43b3ac2015-04-01 14:03:04 -070075
Ian Rogers6f3dbba2014-10-14 17:41:57 -070076// The return_pc of instrumentation exit stub.
77extern "C" void art_quick_instrumentation_exit();
78static inline const void* GetQuickInstrumentationExitPc() {
79 return reinterpret_cast<const void*>(art_quick_instrumentation_exit);
80}
81
82} // namespace art
83
84#endif // ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_