blob: 1618cedef7b7a0340f42b3b0db5b807b5f1b0f28 [file] [log] [blame]
Stuart Monteithb95a5342014-03-12 13:32:32 +00001/*
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 Yang98d1cc82014-05-15 17:02:16 -070017#include "entrypoints/jni/jni_entrypoints.h"
Andreas Gampee1794562014-11-04 22:26:32 -080018#include "entrypoints/quick/quick_alloc_entrypoints.h"
19#include "entrypoints/quick/quick_default_externs.h"
Andreas Gampefc689872016-04-25 20:08:55 -070020#include "entrypoints/quick/quick_default_init_entrypoints.h"
Stuart Monteithb95a5342014-03-12 13:32:32 +000021#include "entrypoints/quick/quick_entrypoints.h"
22#include "entrypoints/entrypoint_utils.h"
23#include "entrypoints/math_entrypoints.h"
Ian Rogers6f3dbba2014-10-14 17:41:57 -070024#include "entrypoints/runtime_asm_entrypoints.h"
25#include "interpreter/interpreter.h"
Stuart Monteithb95a5342014-03-12 13:32:32 +000026
27namespace art {
28
Stuart Monteithb95a5342014-03-12 13:32:32 +000029// Cast entrypoints.
Serban Constantinescu9bd88b02015-04-22 16:24:46 +010030extern "C" uint32_t artIsAssignableFromCode(const mirror::Class* klass,
Stuart Monteithb95a5342014-03-12 13:32:32 +000031 const mirror::Class* ref_class);
Stuart Monteithb95a5342014-03-12 13:32:32 +000032
Andreas Gampe3cfa4d02015-10-06 17:04:01 -070033void InitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) {
Andreas Gampefc689872016-04-25 20:08:55 -070034 DefaultInitEntryPoints(jpoints, qpoints);
Stuart Monteithb95a5342014-03-12 13:32:32 +000035
36 // Cast
Serban Constantinescu9bd88b02015-04-22 16:24:46 +010037 qpoints->pInstanceofNonTrivial = artIsAssignableFromCode;
Stuart Monteithb95a5342014-03-12 13:32:32 +000038 qpoints->pCheckCast = art_quick_check_cast;
39
Stuart Monteithb95a5342014-03-12 13:32:32 +000040 // Math
Mathieu Chartier2cebb242015-04-21 16:50:40 -070041 // TODO null entrypoints not needed for ARM64 - generate inline.
Zheng Xu0210d112014-06-17 12:25:48 +080042 qpoints->pCmpgDouble = nullptr;
43 qpoints->pCmpgFloat = nullptr;
44 qpoints->pCmplDouble = nullptr;
45 qpoints->pCmplFloat = nullptr;
Serban Constantinescu9bd88b02015-04-22 16:24:46 +010046 qpoints->pFmod = fmod;
Zheng Xu0210d112014-06-17 12:25:48 +080047 qpoints->pL2d = nullptr;
Serban Constantinescu9bd88b02015-04-22 16:24:46 +010048 qpoints->pFmodf = fmodf;
Zheng Xu0210d112014-06-17 12:25:48 +080049 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 Monteithb95a5342014-03-12 13:32:32 +000061
Anton Kirilov02fc24e2016-01-20 16:48:19 +000062 // 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 Monteithb95a5342014-03-12 13:32:32 +000081 // Intrinsics
82 qpoints->pIndexOf = art_quick_indexof;
Stuart Monteithb95a5342014-03-12 13:32:32 +000083 qpoints->pStringCompareTo = art_quick_string_compareto;
Serban Constantinescu9bd88b02015-04-22 16:24:46 +010084 qpoints->pMemcpy = memcpy;
Stuart Monteithb95a5342014-03-12 13:32:32 +000085
Roland Levillain0d5a2812015-11-13 10:07:31 +000086 // Read barrier.
Hiroshi Yamauchi1cc71eb2015-05-07 10:47:27 -070087 qpoints->pReadBarrierJni = ReadBarrierJni;
Roland Levillain7c1559a2015-12-15 10:55:36 +000088 qpoints->pReadBarrierMark = artReadBarrierMark;
Man Cao1aee9002015-07-14 22:31:42 -070089 qpoints->pReadBarrierSlow = artReadBarrierSlow;
Roland Levillain0d5a2812015-11-13 10:07:31 +000090 qpoints->pReadBarrierForRootSlow = artReadBarrierForRootSlow;
Stuart Monteithb95a5342014-03-12 13:32:32 +000091};
92
93} // namespace art