blob: 740629a40038558800701c8fa2ffdb81ecc59ec0 [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
Nicolas Geoffray4e92c3c2017-05-08 09:34:26 +010020#include "deoptimization_kind.h"
21
Ian Rogers6f3dbba2014-10-14 17:41:57 -070022namespace art {
23
24#ifndef BUILDING_LIBART
25#error "File and symbols only for use within libart."
26#endif
27
28extern "C" void* art_jni_dlsym_lookup_stub(JNIEnv*, jobject);
29static inline const void* GetJniDlsymLookupStub() {
30 return reinterpret_cast<const void*>(art_jni_dlsym_lookup_stub);
31}
32
Ian Rogers6f3dbba2014-10-14 17:41:57 -070033// Return the address of quick stub code for handling IMT conflicts.
Mathieu Chartiere401d142015-04-22 13:56:20 -070034extern "C" void art_quick_imt_conflict_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070035static inline const void* GetQuickImtConflictStub() {
36 return reinterpret_cast<const void*>(art_quick_imt_conflict_trampoline);
37}
38
Ian Rogers6f3dbba2014-10-14 17:41:57 -070039// Return the address of quick stub code for bridging from quick code to the interpreter.
Mathieu Chartiere401d142015-04-22 13:56:20 -070040extern "C" void art_quick_to_interpreter_bridge(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070041static inline const void* GetQuickToInterpreterBridge() {
42 return reinterpret_cast<const void*>(art_quick_to_interpreter_bridge);
43}
44
Alex Lightdb01a092017-04-03 15:39:55 -070045// Return the address of stub code for attempting to invoke an obsolete method.
46extern "C" void art_invoke_obsolete_method_stub(ArtMethod*);
47static inline const void* GetInvokeObsoleteMethodStub() {
48 return reinterpret_cast<const void*>(art_invoke_obsolete_method_stub);
49}
50
Ian Rogers6f3dbba2014-10-14 17:41:57 -070051// Return the address of quick stub code for handling JNI calls.
Mathieu Chartiere401d142015-04-22 13:56:20 -070052extern "C" void art_quick_generic_jni_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070053static inline const void* GetQuickGenericJniStub() {
54 return reinterpret_cast<const void*>(art_quick_generic_jni_trampoline);
55}
56
Ian Rogers6f3dbba2014-10-14 17:41:57 -070057// Return the address of quick stub code for handling transitions into the proxy invoke handler.
58extern "C" void art_quick_proxy_invoke_handler();
59static inline const void* GetQuickProxyInvokeHandler() {
60 return reinterpret_cast<const void*>(art_quick_proxy_invoke_handler);
61}
62
Ian Rogers6f3dbba2014-10-14 17:41:57 -070063// Return the address of quick stub code for resolving a method at first call.
Mathieu Chartiere401d142015-04-22 13:56:20 -070064extern "C" void art_quick_resolution_trampoline(ArtMethod*);
Ian Rogers6f3dbba2014-10-14 17:41:57 -070065static inline const void* GetQuickResolutionStub() {
66 return reinterpret_cast<const void*>(art_quick_resolution_trampoline);
67}
68
69// Entry point for quick code that performs deoptimization.
70extern "C" void art_quick_deoptimize();
71static inline const void* GetQuickDeoptimizationEntryPoint() {
72 return reinterpret_cast<const void*>(art_quick_deoptimize);
73}
74
75// Return address of instrumentation entry point used by non-interpreter based tracing.
76extern "C" void art_quick_instrumentation_entry(void*);
77static inline const void* GetQuickInstrumentationEntryPoint() {
78 return reinterpret_cast<const void*>(art_quick_instrumentation_entry);
79}
80
Sebastien Hertz07474662015-08-25 15:12:33 +000081// Stub to deoptimize from compiled code.
Nicolas Geoffray4e92c3c2017-05-08 09:34:26 +010082extern "C" void art_quick_deoptimize_from_compiled_code(DeoptimizationKind);
Mingyao Yangd43b3ac2015-04-01 14:03:04 -070083
Ian Rogers6f3dbba2014-10-14 17:41:57 -070084// The return_pc of instrumentation exit stub.
85extern "C" void art_quick_instrumentation_exit();
86static inline const void* GetQuickInstrumentationExitPc() {
87 return reinterpret_cast<const void*>(art_quick_instrumentation_exit);
88}
89
Vladimir Marko552a1342017-10-31 10:56:47 +000090extern "C" void* art_quick_string_builder_append(uint32_t format);
Nicolas Geoffraya59af8a2019-11-27 17:42:32 +000091extern "C" void art_quick_compile_optimized(ArtMethod*, Thread*);
Vladimir Marko552a1342017-10-31 10:56:47 +000092
Ian Rogers6f3dbba2014-10-14 17:41:57 -070093} // namespace art
94
95#endif // ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_