1 /*
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) \
30   V(LongReverse, kStatic) \
31   V(LongReverseBytes, kStatic) \
32   V(ShortReverseBytes, kStatic) \
33   V(MathAbsDouble, kStatic) \
34   V(MathAbsFloat, kStatic) \
35   V(MathAbsLong, kStatic) \
36   V(MathAbsInt, kStatic) \
37   V(MathMinDoubleDouble, kStatic) \
38   V(MathMinFloatFloat, kStatic) \
39   V(MathMinLongLong, kStatic) \
40   V(MathMinIntInt, kStatic) \
41   V(MathMaxDoubleDouble, kStatic) \
42   V(MathMaxFloatFloat, kStatic) \
43   V(MathMaxLongLong, kStatic) \
44   V(MathMaxIntInt, kStatic) \
45   V(MathSqrt, kStatic) \
46   V(MathCeil, kStatic) \
47   V(MathFloor, kStatic) \
48   V(MathRint, kStatic) \
49   V(MathRoundDouble, kStatic) \
50   V(MathRoundFloat, kStatic) \
51   V(SystemArrayCopyChar, kStatic) \
52   V(ThreadCurrentThread, kStatic) \
53   V(MemoryPeekByte, kStatic) \
54   V(MemoryPeekIntNative, kStatic) \
55   V(MemoryPeekLongNative, kStatic) \
56   V(MemoryPeekShortNative, kStatic) \
57   V(MemoryPokeByte, kStatic) \
58   V(MemoryPokeIntNative, kStatic) \
59   V(MemoryPokeLongNative, kStatic) \
60   V(MemoryPokeShortNative, kStatic) \
61   V(StringCharAt, kDirect) \
62   V(StringCompareTo, kDirect) \
63   V(StringGetCharsNoCheck, kDirect) \
64   V(StringIndexOf, kDirect) \
65   V(StringIndexOfAfter, kDirect) \
66   V(StringNewStringFromBytes, kStatic) \
67   V(StringNewStringFromChars, kStatic) \
68   V(StringNewStringFromString, kStatic) \
69   V(UnsafeCASInt, kDirect) \
70   V(UnsafeCASLong, kDirect) \
71   V(UnsafeCASObject, kDirect) \
72   V(UnsafeGet, kDirect) \
73   V(UnsafeGetVolatile, kDirect) \
74   V(UnsafeGetObject, kDirect) \
75   V(UnsafeGetObjectVolatile, kDirect) \
76   V(UnsafeGetLong, kDirect) \
77   V(UnsafeGetLongVolatile, kDirect) \
78   V(UnsafePut, kDirect) \
79   V(UnsafePutOrdered, kDirect) \
80   V(UnsafePutVolatile, kDirect) \
81   V(UnsafePutObject, kDirect) \
82   V(UnsafePutObjectOrdered, kDirect) \
83   V(UnsafePutObjectVolatile, kDirect) \
84   V(UnsafePutLong, kDirect) \
85   V(UnsafePutLongOrdered, kDirect) \
86   V(UnsafePutLongVolatile, kDirect) \
87   V(ReferenceGetReferent, kDirect)
88 
89 #endif  // ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_
90 #undef ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_   // #define is only for lint.
91