Andreas Gampe | 71fb52f | 2014-12-29 17:43:08 -0800 | [diff] [blame] | 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 |
agicsaki | 57b81ec | 2015-08-11 17:39:37 -0700 | [diff] [blame] | 21 | // to be a HInvokeStaticOrDirect node (compared to HInvokeVirtual), then whether it requires an |
| 22 | // environment. |
Andreas Gampe | 71fb52f | 2014-12-29 17:43:08 -0800 | [diff] [blame] | 23 | |
| 24 | #define INTRINSICS_LIST(V) \ |
Agi Csaki | 05f2056 | 2015-08-19 14:58:14 -0700 | [diff] [blame] | 25 | V(DoubleDoubleToRawLongBits, kStatic, kNeedsEnvironmentOrCache) \ |
| 26 | V(DoubleLongBitsToDouble, kStatic, kNeedsEnvironmentOrCache) \ |
| 27 | V(FloatFloatToRawIntBits, kStatic, kNeedsEnvironmentOrCache) \ |
| 28 | V(FloatIntBitsToFloat, kStatic, kNeedsEnvironmentOrCache) \ |
| 29 | V(IntegerReverse, kStatic, kNeedsEnvironmentOrCache) \ |
| 30 | V(IntegerReverseBytes, kStatic, kNeedsEnvironmentOrCache) \ |
| 31 | V(IntegerNumberOfLeadingZeros, kStatic, kNeedsEnvironmentOrCache) \ |
Scott Wakeling | 9ee23f4 | 2015-07-23 10:44:35 +0100 | [diff] [blame] | 32 | V(IntegerNumberOfTrailingZeros, kStatic, kNeedsEnvironmentOrCache) \ |
| 33 | V(IntegerRotateRight, kStatic, kNeedsEnvironmentOrCache) \ |
| 34 | V(IntegerRotateLeft, kStatic, kNeedsEnvironmentOrCache) \ |
Agi Csaki | 05f2056 | 2015-08-19 14:58:14 -0700 | [diff] [blame] | 35 | V(LongReverse, kStatic, kNeedsEnvironmentOrCache) \ |
| 36 | V(LongReverseBytes, kStatic, kNeedsEnvironmentOrCache) \ |
| 37 | V(LongNumberOfLeadingZeros, kStatic, kNeedsEnvironmentOrCache) \ |
Scott Wakeling | 9ee23f4 | 2015-07-23 10:44:35 +0100 | [diff] [blame] | 38 | V(LongNumberOfTrailingZeros, kStatic, kNeedsEnvironmentOrCache) \ |
| 39 | V(LongRotateRight, kStatic, kNeedsEnvironmentOrCache) \ |
| 40 | V(LongRotateLeft, kStatic, kNeedsEnvironmentOrCache) \ |
Agi Csaki | 05f2056 | 2015-08-19 14:58:14 -0700 | [diff] [blame] | 41 | V(ShortReverseBytes, kStatic, kNeedsEnvironmentOrCache) \ |
| 42 | V(MathAbsDouble, kStatic, kNeedsEnvironmentOrCache) \ |
| 43 | V(MathAbsFloat, kStatic, kNeedsEnvironmentOrCache) \ |
| 44 | V(MathAbsLong, kStatic, kNeedsEnvironmentOrCache) \ |
| 45 | V(MathAbsInt, kStatic, kNeedsEnvironmentOrCache) \ |
| 46 | V(MathMinDoubleDouble, kStatic, kNeedsEnvironmentOrCache) \ |
| 47 | V(MathMinFloatFloat, kStatic, kNeedsEnvironmentOrCache) \ |
| 48 | V(MathMinLongLong, kStatic, kNeedsEnvironmentOrCache) \ |
| 49 | V(MathMinIntInt, kStatic, kNeedsEnvironmentOrCache) \ |
| 50 | V(MathMaxDoubleDouble, kStatic, kNeedsEnvironmentOrCache) \ |
| 51 | V(MathMaxFloatFloat, kStatic, kNeedsEnvironmentOrCache) \ |
| 52 | V(MathMaxLongLong, kStatic, kNeedsEnvironmentOrCache) \ |
| 53 | V(MathMaxIntInt, kStatic, kNeedsEnvironmentOrCache) \ |
| 54 | V(MathSqrt, kStatic, kNeedsEnvironmentOrCache) \ |
| 55 | V(MathCeil, kStatic, kNeedsEnvironmentOrCache) \ |
| 56 | V(MathFloor, kStatic, kNeedsEnvironmentOrCache) \ |
| 57 | V(MathRint, kStatic, kNeedsEnvironmentOrCache) \ |
| 58 | V(MathRoundDouble, kStatic, kNeedsEnvironmentOrCache) \ |
| 59 | V(MathRoundFloat, kStatic, kNeedsEnvironmentOrCache) \ |
| 60 | V(SystemArrayCopyChar, kStatic, kNeedsEnvironmentOrCache) \ |
Nicolas Geoffray | ee3cf07 | 2015-10-06 11:45:02 +0100 | [diff] [blame^] | 61 | V(SystemArrayCopy, kStatic, kNeedsEnvironmentOrCache) \ |
Agi Csaki | 05f2056 | 2015-08-19 14:58:14 -0700 | [diff] [blame] | 62 | V(ThreadCurrentThread, kStatic, kNeedsEnvironmentOrCache) \ |
| 63 | V(MemoryPeekByte, kStatic, kNeedsEnvironmentOrCache) \ |
| 64 | V(MemoryPeekIntNative, kStatic, kNeedsEnvironmentOrCache) \ |
| 65 | V(MemoryPeekLongNative, kStatic, kNeedsEnvironmentOrCache) \ |
| 66 | V(MemoryPeekShortNative, kStatic, kNeedsEnvironmentOrCache) \ |
| 67 | V(MemoryPokeByte, kStatic, kNeedsEnvironmentOrCache) \ |
| 68 | V(MemoryPokeIntNative, kStatic, kNeedsEnvironmentOrCache) \ |
| 69 | V(MemoryPokeLongNative, kStatic, kNeedsEnvironmentOrCache) \ |
| 70 | V(MemoryPokeShortNative, kStatic, kNeedsEnvironmentOrCache) \ |
| 71 | V(StringCharAt, kDirect, kNeedsEnvironmentOrCache) \ |
| 72 | V(StringCompareTo, kDirect, kNeedsEnvironmentOrCache) \ |
| 73 | V(StringEquals, kDirect, kNeedsEnvironmentOrCache) \ |
| 74 | V(StringGetCharsNoCheck, kDirect, kNeedsEnvironmentOrCache) \ |
| 75 | V(StringIndexOf, kDirect, kNeedsEnvironmentOrCache) \ |
| 76 | V(StringIndexOfAfter, kDirect, kNeedsEnvironmentOrCache) \ |
| 77 | V(StringNewStringFromBytes, kStatic, kNeedsEnvironmentOrCache) \ |
| 78 | V(StringNewStringFromChars, kStatic, kNeedsEnvironmentOrCache) \ |
| 79 | V(StringNewStringFromString, kStatic, kNeedsEnvironmentOrCache) \ |
| 80 | V(UnsafeCASInt, kDirect, kNeedsEnvironmentOrCache) \ |
| 81 | V(UnsafeCASLong, kDirect, kNeedsEnvironmentOrCache) \ |
| 82 | V(UnsafeCASObject, kDirect, kNeedsEnvironmentOrCache) \ |
| 83 | V(UnsafeGet, kDirect, kNeedsEnvironmentOrCache) \ |
| 84 | V(UnsafeGetVolatile, kDirect, kNeedsEnvironmentOrCache) \ |
| 85 | V(UnsafeGetObject, kDirect, kNeedsEnvironmentOrCache) \ |
| 86 | V(UnsafeGetObjectVolatile, kDirect, kNeedsEnvironmentOrCache) \ |
| 87 | V(UnsafeGetLong, kDirect, kNeedsEnvironmentOrCache) \ |
| 88 | V(UnsafeGetLongVolatile, kDirect, kNeedsEnvironmentOrCache) \ |
| 89 | V(UnsafePut, kDirect, kNeedsEnvironmentOrCache) \ |
| 90 | V(UnsafePutOrdered, kDirect, kNeedsEnvironmentOrCache) \ |
| 91 | V(UnsafePutVolatile, kDirect, kNeedsEnvironmentOrCache) \ |
| 92 | V(UnsafePutObject, kDirect, kNeedsEnvironmentOrCache) \ |
| 93 | V(UnsafePutObjectOrdered, kDirect, kNeedsEnvironmentOrCache) \ |
| 94 | V(UnsafePutObjectVolatile, kDirect, kNeedsEnvironmentOrCache) \ |
| 95 | V(UnsafePutLong, kDirect, kNeedsEnvironmentOrCache) \ |
| 96 | V(UnsafePutLongOrdered, kDirect, kNeedsEnvironmentOrCache) \ |
| 97 | V(UnsafePutLongVolatile, kDirect, kNeedsEnvironmentOrCache) \ |
| 98 | V(ReferenceGetReferent, kDirect, kNeedsEnvironmentOrCache) |
Andreas Gampe | 71fb52f | 2014-12-29 17:43:08 -0800 | [diff] [blame] | 99 | |
| 100 | #endif // ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_ |
| 101 | #undef ART_COMPILER_OPTIMIZING_INTRINSICS_LIST_H_ // #define is only for lint. |