Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 1 | /* |
| 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 Geoffray | 4e92c3c | 2017-05-08 09:34:26 +0100 | [diff] [blame] | 20 | #include "deoptimization_kind.h" |
| 21 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 22 | namespace art { |
| 23 | |
| 24 | #ifndef BUILDING_LIBART |
| 25 | #error "File and symbols only for use within libart." |
| 26 | #endif |
| 27 | |
| 28 | extern "C" void* art_jni_dlsym_lookup_stub(JNIEnv*, jobject); |
| 29 | static inline const void* GetJniDlsymLookupStub() { |
| 30 | return reinterpret_cast<const void*>(art_jni_dlsym_lookup_stub); |
| 31 | } |
| 32 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 33 | // Return the address of quick stub code for handling IMT conflicts. |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 34 | extern "C" void art_quick_imt_conflict_trampoline(ArtMethod*); |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 35 | static inline const void* GetQuickImtConflictStub() { |
| 36 | return reinterpret_cast<const void*>(art_quick_imt_conflict_trampoline); |
| 37 | } |
| 38 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 39 | // Return the address of quick stub code for bridging from quick code to the interpreter. |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 40 | extern "C" void art_quick_to_interpreter_bridge(ArtMethod*); |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 41 | static inline const void* GetQuickToInterpreterBridge() { |
| 42 | return reinterpret_cast<const void*>(art_quick_to_interpreter_bridge); |
| 43 | } |
| 44 | |
Alex Light | db01a09 | 2017-04-03 15:39:55 -0700 | [diff] [blame] | 45 | // Return the address of stub code for attempting to invoke an obsolete method. |
| 46 | extern "C" void art_invoke_obsolete_method_stub(ArtMethod*); |
| 47 | static inline const void* GetInvokeObsoleteMethodStub() { |
| 48 | return reinterpret_cast<const void*>(art_invoke_obsolete_method_stub); |
| 49 | } |
| 50 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 51 | // Return the address of quick stub code for handling JNI calls. |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 52 | extern "C" void art_quick_generic_jni_trampoline(ArtMethod*); |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 53 | static inline const void* GetQuickGenericJniStub() { |
| 54 | return reinterpret_cast<const void*>(art_quick_generic_jni_trampoline); |
| 55 | } |
| 56 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 57 | // Return the address of quick stub code for handling transitions into the proxy invoke handler. |
| 58 | extern "C" void art_quick_proxy_invoke_handler(); |
| 59 | static inline const void* GetQuickProxyInvokeHandler() { |
| 60 | return reinterpret_cast<const void*>(art_quick_proxy_invoke_handler); |
| 61 | } |
| 62 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 63 | // Return the address of quick stub code for resolving a method at first call. |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 64 | extern "C" void art_quick_resolution_trampoline(ArtMethod*); |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 65 | static 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. |
| 70 | extern "C" void art_quick_deoptimize(); |
| 71 | static 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. |
| 76 | extern "C" void art_quick_instrumentation_entry(void*); |
| 77 | static inline const void* GetQuickInstrumentationEntryPoint() { |
| 78 | return reinterpret_cast<const void*>(art_quick_instrumentation_entry); |
| 79 | } |
| 80 | |
Sebastien Hertz | 0747466 | 2015-08-25 15:12:33 +0000 | [diff] [blame] | 81 | // Stub to deoptimize from compiled code. |
Nicolas Geoffray | 4e92c3c | 2017-05-08 09:34:26 +0100 | [diff] [blame] | 82 | extern "C" void art_quick_deoptimize_from_compiled_code(DeoptimizationKind); |
Mingyao Yang | d43b3ac | 2015-04-01 14:03:04 -0700 | [diff] [blame] | 83 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 84 | // The return_pc of instrumentation exit stub. |
| 85 | extern "C" void art_quick_instrumentation_exit(); |
| 86 | static inline const void* GetQuickInstrumentationExitPc() { |
| 87 | return reinterpret_cast<const void*>(art_quick_instrumentation_exit); |
| 88 | } |
| 89 | |
Vladimir Marko | 552a134 | 2017-10-31 10:56:47 +0000 | [diff] [blame] | 90 | extern "C" void* art_quick_string_builder_append(uint32_t format); |
Nicolas Geoffray | a59af8a | 2019-11-27 17:42:32 +0000 | [diff] [blame^] | 91 | extern "C" void art_quick_compile_optimized(ArtMethod*, Thread*); |
Vladimir Marko | 552a134 | 2017-10-31 10:56:47 +0000 | [diff] [blame] | 92 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 93 | } // namespace art |
| 94 | |
| 95 | #endif // ART_RUNTIME_ENTRYPOINTS_RUNTIME_ASM_ENTRYPOINTS_H_ |