Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 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 | |
Mingyao Yang | 98d1cc8 | 2014-05-15 17:02:16 -0700 | [diff] [blame] | 17 | #include "entrypoints/jni/jni_entrypoints.h" |
Andreas Gampe | e179456 | 2014-11-04 22:26:32 -0800 | [diff] [blame] | 18 | #include "entrypoints/quick/quick_alloc_entrypoints.h" |
| 19 | #include "entrypoints/quick/quick_default_externs.h" |
Andreas Gampe | fc68987 | 2016-04-25 20:08:55 -0700 | [diff] [blame] | 20 | #include "entrypoints/quick/quick_default_init_entrypoints.h" |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 21 | #include "entrypoints/quick/quick_entrypoints.h" |
| 22 | #include "entrypoints/entrypoint_utils.h" |
| 23 | #include "entrypoints/math_entrypoints.h" |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 24 | #include "entrypoints/runtime_asm_entrypoints.h" |
| 25 | #include "interpreter/interpreter.h" |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 26 | |
| 27 | namespace art { |
| 28 | |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 29 | // Cast entrypoints. |
Serban Constantinescu | 9bd88b0 | 2015-04-22 16:24:46 +0100 | [diff] [blame] | 30 | extern "C" uint32_t artIsAssignableFromCode(const mirror::Class* klass, |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 31 | const mirror::Class* ref_class); |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 32 | |
Andreas Gampe | 3cfa4d0 | 2015-10-06 17:04:01 -0700 | [diff] [blame] | 33 | void InitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) { |
Andreas Gampe | fc68987 | 2016-04-25 20:08:55 -0700 | [diff] [blame] | 34 | DefaultInitEntryPoints(jpoints, qpoints); |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 35 | |
| 36 | // Cast |
Serban Constantinescu | 9bd88b0 | 2015-04-22 16:24:46 +0100 | [diff] [blame] | 37 | qpoints->pInstanceofNonTrivial = artIsAssignableFromCode; |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 38 | qpoints->pCheckCast = art_quick_check_cast; |
| 39 | |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 40 | // Math |
Mathieu Chartier | 2cebb24 | 2015-04-21 16:50:40 -0700 | [diff] [blame] | 41 | // TODO null entrypoints not needed for ARM64 - generate inline. |
Zheng Xu | 0210d11 | 2014-06-17 12:25:48 +0800 | [diff] [blame] | 42 | qpoints->pCmpgDouble = nullptr; |
| 43 | qpoints->pCmpgFloat = nullptr; |
| 44 | qpoints->pCmplDouble = nullptr; |
| 45 | qpoints->pCmplFloat = nullptr; |
Serban Constantinescu | 9bd88b0 | 2015-04-22 16:24:46 +0100 | [diff] [blame] | 46 | qpoints->pFmod = fmod; |
Zheng Xu | 0210d11 | 2014-06-17 12:25:48 +0800 | [diff] [blame] | 47 | qpoints->pL2d = nullptr; |
Serban Constantinescu | 9bd88b0 | 2015-04-22 16:24:46 +0100 | [diff] [blame] | 48 | qpoints->pFmodf = fmodf; |
Zheng Xu | 0210d11 | 2014-06-17 12:25:48 +0800 | [diff] [blame] | 49 | qpoints->pL2f = nullptr; |
| 50 | qpoints->pD2iz = nullptr; |
| 51 | qpoints->pF2iz = nullptr; |
| 52 | qpoints->pIdivmod = nullptr; |
| 53 | qpoints->pD2l = nullptr; |
| 54 | qpoints->pF2l = nullptr; |
| 55 | qpoints->pLdiv = nullptr; |
| 56 | qpoints->pLmod = nullptr; |
| 57 | qpoints->pLmul = nullptr; |
| 58 | qpoints->pShlLong = nullptr; |
| 59 | qpoints->pShrLong = nullptr; |
| 60 | qpoints->pUshrLong = nullptr; |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 61 | |
Anton Kirilov | 02fc24e | 2016-01-20 16:48:19 +0000 | [diff] [blame] | 62 | // More math. |
| 63 | qpoints->pCos = cos; |
| 64 | qpoints->pSin = sin; |
| 65 | qpoints->pAcos = acos; |
| 66 | qpoints->pAsin = asin; |
| 67 | qpoints->pAtan = atan; |
| 68 | qpoints->pAtan2 = atan2; |
| 69 | qpoints->pCbrt = cbrt; |
| 70 | qpoints->pCosh = cosh; |
| 71 | qpoints->pExp = exp; |
| 72 | qpoints->pExpm1 = expm1; |
| 73 | qpoints->pHypot = hypot; |
| 74 | qpoints->pLog = log; |
| 75 | qpoints->pLog10 = log10; |
| 76 | qpoints->pNextAfter = nextafter; |
| 77 | qpoints->pSinh = sinh; |
| 78 | qpoints->pTan = tan; |
| 79 | qpoints->pTanh = tanh; |
| 80 | |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 81 | // Intrinsics |
| 82 | qpoints->pIndexOf = art_quick_indexof; |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 83 | qpoints->pStringCompareTo = art_quick_string_compareto; |
Serban Constantinescu | 9bd88b0 | 2015-04-22 16:24:46 +0100 | [diff] [blame] | 84 | qpoints->pMemcpy = memcpy; |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 85 | |
Roland Levillain | 0d5a281 | 2015-11-13 10:07:31 +0000 | [diff] [blame] | 86 | // Read barrier. |
Hiroshi Yamauchi | 1cc71eb | 2015-05-07 10:47:27 -0700 | [diff] [blame] | 87 | qpoints->pReadBarrierJni = ReadBarrierJni; |
Roland Levillain | 7c1559a | 2015-12-15 10:55:36 +0000 | [diff] [blame] | 88 | qpoints->pReadBarrierMark = artReadBarrierMark; |
Man Cao | 1aee900 | 2015-07-14 22:31:42 -0700 | [diff] [blame] | 89 | qpoints->pReadBarrierSlow = artReadBarrierSlow; |
Roland Levillain | 0d5a281 | 2015-11-13 10:07:31 +0000 | [diff] [blame] | 90 | qpoints->pReadBarrierForRootSlow = artReadBarrierForRootSlow; |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 91 | }; |
| 92 | |
| 93 | } // namespace art |