blob: d28c5a3f2fb0f31b6fc4e3e70728ca5161304ac1 [file] [log] [blame]
Andreas Gampe71fb52f2014-12-29 17:43:08 -08001/*
2 * Copyright (C) 2015 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_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_
18#define ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_
19
20// All intrinsics supported by the optimizing compiler. Format is name, then whether it is expected
21// to be a HInvokeStaticOrDirect node (compared to HInvokeVirtual).
22
23#define INTRINSICS_LIST(V) \
24 V(DoubleDoubleToRawLongBits, kStatic) \
25 V(DoubleLongBitsToDouble, kStatic) \
26 V(FloatFloatToRawIntBits, kStatic) \
27 V(FloatIntBitsToFloat, kStatic) \
28 V(IntegerReverse, kStatic) \
29 V(IntegerReverseBytes, kStatic) \
Scott Wakeling611d3392015-07-10 11:42:06 +010030 V(IntegerNumberOfLeadingZeros, kStatic) \
Andreas Gampe71fb52f2014-12-29 17:43:08 -080031 V(LongReverse, kStatic) \
32 V(LongReverseBytes, kStatic) \
Scott Wakeling611d3392015-07-10 11:42:06 +010033 V(LongNumberOfLeadingZeros, kStatic) \
Andreas Gampe71fb52f2014-12-29 17:43:08 -080034 V(ShortReverseBytes, kStatic) \
35 V(MathAbsDouble, kStatic) \
36 V(MathAbsFloat, kStatic) \
37 V(MathAbsLong, kStatic) \
38 V(MathAbsInt, kStatic) \
39 V(MathMinDoubleDouble, kStatic) \
40 V(MathMinFloatFloat, kStatic) \
41 V(MathMinLongLong, kStatic) \
42 V(MathMinIntInt, kStatic) \
43 V(MathMaxDoubleDouble, kStatic) \
44 V(MathMaxFloatFloat, kStatic) \
45 V(MathMaxLongLong, kStatic) \
46 V(MathMaxIntInt, kStatic) \
47 V(MathSqrt, kStatic) \
48 V(MathCeil, kStatic) \
49 V(MathFloor, kStatic) \
50 V(MathRint, kStatic) \
51 V(MathRoundDouble, kStatic) \
52 V(MathRoundFloat, kStatic) \
53 V(SystemArrayCopyChar, kStatic) \
54 V(ThreadCurrentThread, kStatic) \
55 V(MemoryPeekByte, kStatic) \
56 V(MemoryPeekIntNative, kStatic) \
57 V(MemoryPeekLongNative, kStatic) \
58 V(MemoryPeekShortNative, kStatic) \
59 V(MemoryPokeByte, kStatic) \
60 V(MemoryPokeIntNative, kStatic) \
61 V(MemoryPokeLongNative, kStatic) \
62 V(MemoryPokeShortNative, kStatic) \
63 V(StringCharAt, kDirect) \
64 V(StringCompareTo, kDirect) \
Jeff Hao848f70a2014-01-15 13:49:50 -080065 V(StringGetCharsNoCheck, kDirect) \
Andreas Gampe71fb52f2014-12-29 17:43:08 -080066 V(StringIndexOf, kDirect) \
67 V(StringIndexOfAfter, kDirect) \
Jeff Hao848f70a2014-01-15 13:49:50 -080068 V(StringNewStringFromBytes, kStatic) \
69 V(StringNewStringFromChars, kStatic) \
70 V(StringNewStringFromString, kStatic) \
Andreas Gampe71fb52f2014-12-29 17:43:08 -080071 V(UnsafeCASInt, kDirect) \
72 V(UnsafeCASLong, kDirect) \
73 V(UnsafeCASObject, kDirect) \
74 V(UnsafeGet, kDirect) \
75 V(UnsafeGetVolatile, kDirect) \
Andreas Gampe878d58c2015-01-15 23:24:00 -080076 V(UnsafeGetObject, kDirect) \
77 V(UnsafeGetObjectVolatile, kDirect) \
Andreas Gampe71fb52f2014-12-29 17:43:08 -080078 V(UnsafeGetLong, kDirect) \
79 V(UnsafeGetLongVolatile, kDirect) \
80 V(UnsafePut, kDirect) \
81 V(UnsafePutOrdered, kDirect) \
82 V(UnsafePutVolatile, kDirect) \
83 V(UnsafePutObject, kDirect) \
84 V(UnsafePutObjectOrdered, kDirect) \
85 V(UnsafePutObjectVolatile, kDirect) \
86 V(UnsafePutLong, kDirect) \
87 V(UnsafePutLongOrdered, kDirect) \
88 V(UnsafePutLongVolatile, kDirect) \
Andreas Gampe878d58c2015-01-15 23:24:00 -080089 V(ReferenceGetReferent, kDirect)
Andreas Gampe71fb52f2014-12-29 17:43:08 -080090
91#endif // ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_
92#undef ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_ // #define is only for lint.