1*795d594fSAndroid Build Coastguard Worker /*
2*795d594fSAndroid Build Coastguard Worker * Copyright (C) 2012 The Android Open Source Project
3*795d594fSAndroid Build Coastguard Worker *
4*795d594fSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
5*795d594fSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
6*795d594fSAndroid Build Coastguard Worker * You may obtain a copy of the License at
7*795d594fSAndroid Build Coastguard Worker *
8*795d594fSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0
9*795d594fSAndroid Build Coastguard Worker *
10*795d594fSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
11*795d594fSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
12*795d594fSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*795d594fSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
14*795d594fSAndroid Build Coastguard Worker * limitations under the License.
15*795d594fSAndroid Build Coastguard Worker */
16*795d594fSAndroid Build Coastguard Worker
17*795d594fSAndroid Build Coastguard Worker #ifndef ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_
18*795d594fSAndroid Build Coastguard Worker #define ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_
19*795d594fSAndroid Build Coastguard Worker
20*795d594fSAndroid Build Coastguard Worker #include "deoptimization_kind.h"
21*795d594fSAndroid Build Coastguard Worker
22*795d594fSAndroid Build Coastguard Worker #include "base/macros.h"
23*795d594fSAndroid Build Coastguard Worker #include "jni.h"
24*795d594fSAndroid Build Coastguard Worker
25*795d594fSAndroid Build Coastguard Worker namespace art HIDDEN {
26*795d594fSAndroid Build Coastguard Worker
27*795d594fSAndroid Build Coastguard Worker class ArtMethod;
28*795d594fSAndroid Build Coastguard Worker class Thread;
29*795d594fSAndroid Build Coastguard Worker
30*795d594fSAndroid Build Coastguard Worker extern "C" void* art_jni_dlsym_lookup_stub(JNIEnv*, jobject);
GetJniDlsymLookupStub()31*795d594fSAndroid Build Coastguard Worker static inline const void* GetJniDlsymLookupStub() {
32*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_jni_dlsym_lookup_stub);
33*795d594fSAndroid Build Coastguard Worker }
34*795d594fSAndroid Build Coastguard Worker
35*795d594fSAndroid Build Coastguard Worker extern "C" void* art_jni_dlsym_lookup_critical_stub(JNIEnv*, jobject);
GetJniDlsymLookupCriticalStub()36*795d594fSAndroid Build Coastguard Worker static inline const void* GetJniDlsymLookupCriticalStub() {
37*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_jni_dlsym_lookup_critical_stub);
38*795d594fSAndroid Build Coastguard Worker }
39*795d594fSAndroid Build Coastguard Worker
40*795d594fSAndroid Build Coastguard Worker // Return the address of quick stub code for handling IMT conflicts.
41*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_imt_conflict_trampoline(ArtMethod*);
GetQuickImtConflictStub()42*795d594fSAndroid Build Coastguard Worker static inline const void* GetQuickImtConflictStub() {
43*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_quick_imt_conflict_trampoline);
44*795d594fSAndroid Build Coastguard Worker }
45*795d594fSAndroid Build Coastguard Worker
46*795d594fSAndroid Build Coastguard Worker // Return the address of quick stub code for bridging from quick code to the interpreter.
47*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_to_interpreter_bridge(ArtMethod*);
GetQuickToInterpreterBridge()48*795d594fSAndroid Build Coastguard Worker static inline const void* GetQuickToInterpreterBridge() {
49*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_quick_to_interpreter_bridge);
50*795d594fSAndroid Build Coastguard Worker }
51*795d594fSAndroid Build Coastguard Worker
52*795d594fSAndroid Build Coastguard Worker // Return the address of stub code for attempting to invoke an obsolete method.
53*795d594fSAndroid Build Coastguard Worker extern "C" void art_invoke_obsolete_method_stub(ArtMethod*);
GetInvokeObsoleteMethodStub()54*795d594fSAndroid Build Coastguard Worker static inline const void* GetInvokeObsoleteMethodStub() {
55*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_invoke_obsolete_method_stub);
56*795d594fSAndroid Build Coastguard Worker }
57*795d594fSAndroid Build Coastguard Worker
58*795d594fSAndroid Build Coastguard Worker // Return the address of quick stub code for handling JNI calls.
59*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_generic_jni_trampoline(ArtMethod*);
GetQuickGenericJniStub()60*795d594fSAndroid Build Coastguard Worker static inline const void* GetQuickGenericJniStub() {
61*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_quick_generic_jni_trampoline);
62*795d594fSAndroid Build Coastguard Worker }
63*795d594fSAndroid Build Coastguard Worker
64*795d594fSAndroid Build Coastguard Worker // Return the address of quick stub code for handling transitions into the proxy invoke handler.
65*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_proxy_invoke_handler();
GetQuickProxyInvokeHandler()66*795d594fSAndroid Build Coastguard Worker static inline const void* GetQuickProxyInvokeHandler() {
67*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_quick_proxy_invoke_handler);
68*795d594fSAndroid Build Coastguard Worker }
69*795d594fSAndroid Build Coastguard Worker
70*795d594fSAndroid Build Coastguard Worker // Return the address of quick stub code for resolving a method at first call.
71*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_resolution_trampoline(ArtMethod*);
GetQuickResolutionStub()72*795d594fSAndroid Build Coastguard Worker static inline const void* GetQuickResolutionStub() {
73*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_quick_resolution_trampoline);
74*795d594fSAndroid Build Coastguard Worker }
75*795d594fSAndroid Build Coastguard Worker
76*795d594fSAndroid Build Coastguard Worker // Entry point for quick code that performs deoptimization.
77*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_deoptimize();
GetQuickDeoptimizationEntryPoint()78*795d594fSAndroid Build Coastguard Worker static inline const void* GetQuickDeoptimizationEntryPoint() {
79*795d594fSAndroid Build Coastguard Worker return reinterpret_cast<const void*>(art_quick_deoptimize);
80*795d594fSAndroid Build Coastguard Worker }
81*795d594fSAndroid Build Coastguard Worker
82*795d594fSAndroid Build Coastguard Worker // Stub to deoptimize from compiled code.
83*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_deoptimize_from_compiled_code(DeoptimizationKind);
84*795d594fSAndroid Build Coastguard Worker
85*795d594fSAndroid Build Coastguard Worker extern "C" void* art_quick_string_builder_append(uint32_t format);
86*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_compile_optimized(ArtMethod*, Thread*);
87*795d594fSAndroid Build Coastguard Worker extern "C" void art_quick_method_entry_hook(ArtMethod*, Thread*);
88*795d594fSAndroid Build Coastguard Worker extern "C" int32_t art_quick_method_exit_hook(Thread*, ArtMethod*, uint64_t*, uint64_t*);
89*795d594fSAndroid Build Coastguard Worker
90*795d594fSAndroid Build Coastguard Worker } // namespace art
91*795d594fSAndroid Build Coastguard Worker
92*795d594fSAndroid Build Coastguard Worker #endif // ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_
93