buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 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 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 17 | #ifndef ART_COMPILER_DEX_COMPILER_ENUMS_H_ |
| 18 | #define ART_COMPILER_DEX_COMPILER_ENUMS_H_ |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 19 | |
| 20 | #include "dex_instruction.h" |
| 21 | |
| 22 | namespace art { |
| 23 | |
| 24 | enum RegisterClass { |
Serban Constantinescu | 032d377 | 2014-05-23 17:38:18 +0100 | [diff] [blame] | 25 | kInvalidRegClass, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 26 | kCoreReg, |
| 27 | kFPReg, |
buzbee | a0cd2d7 | 2014-06-01 09:33:49 -0700 | [diff] [blame] | 28 | kRefReg, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 29 | kAnyReg, |
| 30 | }; |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 31 | std::ostream& operator<<(std::ostream& os, const RegisterClass& rhs); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 32 | |
buzbee | 091cc40 | 2014-03-31 10:14:40 -0700 | [diff] [blame] | 33 | enum BitsUsed { |
| 34 | kSize32Bits, |
| 35 | kSize64Bits, |
| 36 | kSize128Bits, |
| 37 | kSize256Bits, |
| 38 | kSize512Bits, |
| 39 | kSize1024Bits, |
| 40 | }; |
Ian Rogers | b28c1c0 | 2014-11-08 11:21:21 -0800 | [diff] [blame] | 41 | std::ostream& operator<<(std::ostream& os, const BitsUsed& rhs); |
buzbee | 091cc40 | 2014-03-31 10:14:40 -0700 | [diff] [blame] | 42 | |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 43 | enum SpecialTargetRegister { |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 44 | kSelf, // Thread pointer. |
| 45 | kSuspend, // Used to reduce suspend checks for some targets. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 46 | kLr, |
| 47 | kPc, |
| 48 | kSp, |
| 49 | kArg0, |
| 50 | kArg1, |
| 51 | kArg2, |
| 52 | kArg3, |
Dmitry Petrochenko | 58994cd | 2014-05-17 01:02:18 +0700 | [diff] [blame] | 53 | kArg4, |
| 54 | kArg5, |
buzbee | 33ae558 | 2014-06-12 14:56:32 -0700 | [diff] [blame] | 55 | kArg6, |
| 56 | kArg7, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 57 | kFArg0, |
| 58 | kFArg1, |
| 59 | kFArg2, |
| 60 | kFArg3, |
Dmitry Petrochenko | 58994cd | 2014-05-17 01:02:18 +0700 | [diff] [blame] | 61 | kFArg4, |
| 62 | kFArg5, |
| 63 | kFArg6, |
| 64 | kFArg7, |
Zheng Xu | 5667fdb | 2014-10-23 18:29:55 +0800 | [diff] [blame] | 65 | kFArg8, |
| 66 | kFArg9, |
| 67 | kFArg10, |
| 68 | kFArg11, |
| 69 | kFArg12, |
| 70 | kFArg13, |
| 71 | kFArg14, |
| 72 | kFArg15, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 73 | kRet0, |
| 74 | kRet1, |
| 75 | kInvokeTgt, |
Jeff Hao | 88474b4 | 2013-10-23 16:24:40 -0700 | [diff] [blame] | 76 | kHiddenArg, |
| 77 | kHiddenFpArg, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 78 | kCount |
| 79 | }; |
Ian Rogers | b28c1c0 | 2014-11-08 11:21:21 -0800 | [diff] [blame] | 80 | std::ostream& operator<<(std::ostream& os, const SpecialTargetRegister& code); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 81 | |
| 82 | enum RegLocationType { |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 83 | kLocDalvikFrame = 0, // Normal Dalvik register |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 84 | kLocPhysReg, |
| 85 | kLocCompilerTemp, |
| 86 | kLocInvalid |
| 87 | }; |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 88 | std::ostream& operator<<(std::ostream& os, const RegLocationType& rhs); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 89 | |
| 90 | enum BBType { |
buzbee | 0d82948 | 2013-10-11 15:24:55 -0700 | [diff] [blame] | 91 | kNullBlock, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 92 | kEntryBlock, |
| 93 | kDalvikByteCode, |
| 94 | kExitBlock, |
| 95 | kExceptionHandling, |
| 96 | kDead, |
| 97 | }; |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 98 | std::ostream& operator<<(std::ostream& os, const BBType& code); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 99 | |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 100 | // Shared pseudo opcodes - must be < 0. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 101 | enum LIRPseudoOpcode { |
David Srbecky | 6f71589 | 2015-03-30 14:21:42 +0100 | [diff] [blame] | 102 | kPseudoPrologueBegin = -18, |
| 103 | kPseudoPrologueEnd = -17, |
| 104 | kPseudoEpilogueBegin = -16, |
| 105 | kPseudoEpilogueEnd = -15, |
| 106 | kPseudoExportedPC = -14, |
| 107 | kPseudoSafepointPC = -13, |
| 108 | kPseudoIntrinsicRetry = -12, |
| 109 | kPseudoSuspendTarget = -11, |
| 110 | kPseudoThrowTarget = -10, |
| 111 | kPseudoCaseLabel = -9, |
buzbee | a169e1d | 2012-12-05 14:26:44 -0800 | [diff] [blame] | 112 | kPseudoBarrier = -8, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 113 | kPseudoEntryBlock = -7, |
| 114 | kPseudoExitBlock = -6, |
| 115 | kPseudoTargetLabel = -5, |
| 116 | kPseudoDalvikByteCodeBoundary = -4, |
| 117 | kPseudoPseudoAlign4 = -3, |
| 118 | kPseudoEHBlockLabel = -2, |
| 119 | kPseudoNormalBlockLabel = -1, |
| 120 | }; |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 121 | std::ostream& operator<<(std::ostream& os, const LIRPseudoOpcode& rhs); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 122 | |
| 123 | enum ExtendedMIROpcode { |
| 124 | kMirOpFirst = kNumPackedOpcodes, |
| 125 | kMirOpPhi = kMirOpFirst, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 126 | |
| 127 | // @brief Copy from one VR to another. |
| 128 | // @details |
| 129 | // vA: destination VR |
| 130 | // vB: source VR |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 131 | kMirOpCopy, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 132 | |
| 133 | // @brief Used to do float comparison with less-than bias. |
| 134 | // @details Unlike cmpl-float, this does not store result of comparison in VR. |
| 135 | // vA: left-hand side VR for comparison. |
| 136 | // vB: right-hand side VR for comparison. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 137 | kMirOpFusedCmplFloat, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 138 | |
| 139 | // @brief Used to do float comparison with greater-than bias. |
| 140 | // @details Unlike cmpg-float, this does not store result of comparison in VR. |
| 141 | // vA: left-hand side VR for comparison. |
| 142 | // vB: right-hand side VR for comparison. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 143 | kMirOpFusedCmpgFloat, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 144 | |
| 145 | // @brief Used to do double comparison with less-than bias. |
| 146 | // @details Unlike cmpl-double, this does not store result of comparison in VR. |
| 147 | // vA: left-hand side wide VR for comparison. |
| 148 | // vB: right-hand side wide VR for comparison. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 149 | kMirOpFusedCmplDouble, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 150 | |
| 151 | // @brief Used to do double comparison with greater-than bias. |
| 152 | // @details Unlike cmpl-double, this does not store result of comparison in VR. |
| 153 | // vA: left-hand side wide VR for comparison. |
| 154 | // vB: right-hand side wide VR for comparison. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 155 | kMirOpFusedCmpgDouble, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 156 | |
| 157 | // @brief Used to do comparison of 64-bit long integers. |
| 158 | // @details Unlike cmp-long, this does not store result of comparison in VR. |
| 159 | // vA: left-hand side wide VR for comparison. |
| 160 | // vB: right-hand side wide VR for comparison. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 161 | kMirOpFusedCmpLong, |
Razvan A Lupusoru | 1500e6f | 2014-08-22 15:39:50 -0700 | [diff] [blame] | 162 | |
| 163 | // @brief This represents no-op. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 164 | kMirOpNop, |
Razvan A Lupusoru | 7642324 | 2014-08-04 09:38:46 -0700 | [diff] [blame] | 165 | |
| 166 | // @brief Do a null check on the object register. |
| 167 | // @details The backends may implement this implicitly or explicitly. This MIR is guaranteed |
| 168 | // to have the correct offset as an exception thrower. |
| 169 | // vA: object register |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 170 | kMirOpNullCheck, |
Razvan A Lupusoru | 7642324 | 2014-08-04 09:38:46 -0700 | [diff] [blame] | 171 | |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 172 | kMirOpRangeCheck, |
| 173 | kMirOpDivZeroCheck, |
| 174 | kMirOpCheck, |
buzbee | f662a7c | 2013-02-12 16:19:43 -0800 | [diff] [blame] | 175 | kMirOpSelect, |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 176 | |
| 177 | // Vector opcodes: |
| 178 | // TypeSize is an encoded field giving the element type and the vector size. |
| 179 | // It is encoded as OpSize << 16 | (number of bits in vector) |
| 180 | // |
| 181 | // Destination and source are integers that will be interpreted by the |
| 182 | // backend that supports Vector operations. Backends are permitted to support only |
| 183 | // certain vector register sizes. |
| 184 | // |
| 185 | // At this point, only two operand instructions are supported. Three operand instructions |
| 186 | // could be supported by using a bit in TypeSize and arg[0] where needed. |
| 187 | |
| 188 | // @brief MIR to move constant data to a vector register |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 189 | // vA: destination |
| 190 | // vB: number of bits in register |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 191 | // args[0]~args[3]: up to 128 bits of data for initialization |
| 192 | kMirOpConstVector, |
| 193 | |
| 194 | // @brief MIR to move a vectorized register to another |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 195 | // vA: destination |
| 196 | // vB: source |
| 197 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 198 | kMirOpMoveVector, |
| 199 | |
| 200 | // @brief Packed multiply of units in two vector registers: vB = vB .* vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 201 | // vA: destination and source |
| 202 | // vB: source |
| 203 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 204 | kMirOpPackedMultiply, |
| 205 | |
| 206 | // @brief Packed addition of units in two vector registers: vB = vB .+ vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 207 | // vA: destination and source |
| 208 | // vB: source |
| 209 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 210 | kMirOpPackedAddition, |
| 211 | |
| 212 | // @brief Packed subtraction of units in two vector registers: vB = vB .- vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 213 | // vA: destination and source |
| 214 | // vB: source |
| 215 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 216 | kMirOpPackedSubtract, |
| 217 | |
| 218 | // @brief Packed shift left of units in two vector registers: vB = vB .<< vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 219 | // vA: destination and source |
| 220 | // vB: amount to shift |
| 221 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 222 | kMirOpPackedShiftLeft, |
| 223 | |
| 224 | // @brief Packed signed shift right of units in two vector registers: vB = vB .>> vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 225 | // vA: destination and source |
| 226 | // vB: amount to shift |
| 227 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 228 | kMirOpPackedSignedShiftRight, |
| 229 | |
| 230 | // @brief Packed unsigned shift right of units in two vector registers: vB = vB .>>> vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 231 | // vA: destination and source |
| 232 | // vB: amount to shift |
| 233 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 234 | kMirOpPackedUnsignedShiftRight, |
| 235 | |
| 236 | // @brief Packed bitwise and of units in two vector registers: vB = vB .& vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 237 | // vA: destination and source |
| 238 | // vB: source |
| 239 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 240 | kMirOpPackedAnd, |
| 241 | |
| 242 | // @brief Packed bitwise or of units in two vector registers: vB = vB .| vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 243 | // vA: destination and source |
| 244 | // vB: source |
| 245 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 246 | kMirOpPackedOr, |
| 247 | |
| 248 | // @brief Packed bitwise xor of units in two vector registers: vB = vB .^ vC using vA to know the type of the vector. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 249 | // vA: destination and source |
| 250 | // vB: source |
| 251 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 252 | kMirOpPackedXor, |
| 253 | |
| 254 | // @brief Reduce a 128-bit packed element into a single VR by taking lower bits |
| 255 | // @details Instruction does a horizontal addition of the packed elements and then adds it to VR |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 256 | // vA: destination and source VR (not vector register) |
| 257 | // vB: source (vector register) |
| 258 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 259 | kMirOpPackedAddReduce, |
| 260 | |
| 261 | // @brief Extract a packed element into a single VR. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 262 | // vA: destination VR (not vector register) |
| 263 | // vB: source (vector register) |
| 264 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 265 | // arg[0]: The index to use for extraction from vector register (which packed element) |
| 266 | kMirOpPackedReduce, |
| 267 | |
| 268 | // @brief Create a vector value, with all TypeSize values equal to vC |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 269 | // vA: destination vector register |
| 270 | // vB: source VR (not vector register) |
| 271 | // vC: TypeSize |
Mark Mendell | d65c51a | 2014-04-29 16:55:20 -0400 | [diff] [blame] | 272 | kMirOpPackedSet, |
| 273 | |
Lupusoru, Razvan A | b3a84e2 | 2014-07-28 14:11:01 -0700 | [diff] [blame] | 274 | // @brief Reserve a range of vector registers. |
| 275 | // vA: Start vector register to reserve. |
| 276 | // vB: Inclusive end vector register to reserve. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 277 | // @note: The backend may choose to map vector numbers used in vector opcodes. |
| 278 | // Reserved registers are removed from the list of backend temporary pool. |
| 279 | kMirOpReserveVectorRegisters, |
| 280 | |
Lupusoru, Razvan A | b3a84e2 | 2014-07-28 14:11:01 -0700 | [diff] [blame] | 281 | // @brief Free a range of reserved vector registers |
| 282 | // vA: Start vector register to unreserve. |
| 283 | // vB: Inclusive end vector register to unreserve. |
Udayan Banerji | 60bfe7b | 2014-07-08 19:59:43 -0700 | [diff] [blame] | 284 | // @note: All currently reserved vector registers are returned to the temporary pool. |
| 285 | kMirOpReturnVectorRegisters, |
| 286 | |
Jean Christophe Beyler | b5bce7c | 2014-07-25 12:32:18 -0700 | [diff] [blame] | 287 | // @brief Create a memory barrier. |
| 288 | // vA: a constant defined by enum MemBarrierKind. |
| 289 | kMirOpMemBarrier, |
| 290 | |
Lupusoru, Razvan A | b3a84e2 | 2014-07-28 14:11:01 -0700 | [diff] [blame] | 291 | // @brief Used to fill a vector register with array values. |
| 292 | // @details Just as with normal arrays, access on null object register must ensure NullPointerException |
| 293 | // and invalid index must ensure ArrayIndexOutOfBoundsException. Exception behavior must be the same |
| 294 | // as the aget it replaced and must happen at same index. Therefore, it is generally recommended that |
| 295 | // before using this MIR, it is proven that exception is guaranteed to not be thrown and marked with |
| 296 | // MIR_IGNORE_NULL_CHECK and MIR_IGNORE_RANGE_CHECK. |
| 297 | // vA: destination vector register |
| 298 | // vB: array register |
| 299 | // vC: index register |
| 300 | // arg[0]: TypeSize (most other vector opcodes have this in vC) |
| 301 | kMirOpPackedArrayGet, |
| 302 | |
| 303 | // @brief Used to store a vector register into array. |
| 304 | // @details Just as with normal arrays, access on null object register must ensure NullPointerException |
| 305 | // and invalid index must ensure ArrayIndexOutOfBoundsException. Exception behavior must be the same |
| 306 | // as the aget it replaced and must happen at same index. Therefore, it is generally recommended that |
| 307 | // before using this MIR, it is proven that exception is guaranteed to not be thrown and marked with |
| 308 | // MIR_IGNORE_NULL_CHECK and MIR_IGNORE_RANGE_CHECK. |
| 309 | // vA: source vector register |
| 310 | // vB: array register |
| 311 | // vC: index register |
| 312 | // arg[0]: TypeSize (most other vector opcodes have this in vC) |
| 313 | kMirOpPackedArrayPut, |
| 314 | |
Ningsheng Jian | a262f77 | 2014-11-25 16:48:07 +0800 | [diff] [blame] | 315 | // @brief Multiply-add integer. |
| 316 | // vA: destination |
| 317 | // vB: multiplicand |
| 318 | // vC: multiplier |
| 319 | // arg[0]: addend |
| 320 | kMirOpMaddInt, |
| 321 | |
| 322 | // @brief Multiply-subtract integer. |
| 323 | // vA: destination |
| 324 | // vB: multiplicand |
| 325 | // vC: multiplier |
| 326 | // arg[0]: minuend |
| 327 | kMirOpMsubInt, |
| 328 | |
| 329 | // @brief Multiply-add long. |
| 330 | // vA: destination |
| 331 | // vB: multiplicand |
| 332 | // vC: multiplier |
| 333 | // arg[0]: addend |
| 334 | kMirOpMaddLong, |
| 335 | |
| 336 | // @brief Multiply-subtract long. |
| 337 | // vA: destination |
| 338 | // vB: multiplicand |
| 339 | // vC: multiplier |
| 340 | // arg[0]: minuend |
| 341 | kMirOpMsubLong, |
| 342 | |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 343 | kMirOpLast, |
| 344 | }; |
| 345 | |
Jean Christophe Beyler | 89fde26 | 2014-04-30 11:40:07 -0700 | [diff] [blame] | 346 | enum MIROptimizationFlagPositions { |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 347 | kMIRIgnoreNullCheck = 0, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 348 | kMIRIgnoreRangeCheck, |
Vladimir Marko | 22fe45d | 2015-03-18 11:33:58 +0000 | [diff] [blame] | 349 | kMIRIgnoreCheckCast, |
Vladimir Marko | 743b98c | 2014-11-24 19:45:41 +0000 | [diff] [blame] | 350 | kMIRStoreNonNullValue, // Storing non-null value, always mark GC card. |
Vladimir Marko | 66c6d7b | 2014-10-16 15:41:48 +0100 | [diff] [blame] | 351 | kMIRClassIsInitialized, |
| 352 | kMIRClassIsInDexCache, |
Razvan A Lupusoru | 5c5676b | 2014-09-29 16:42:11 -0700 | [diff] [blame] | 353 | kMirIgnoreDivZeroCheck, |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 354 | kMIRInlined, // Invoke is inlined (ie dead). |
| 355 | kMIRInlinedPred, // Invoke is inlined via prediction. |
| 356 | kMIRCallee, // Instruction is inlined from callee. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 357 | kMIRIgnoreSuspendCheck, |
| 358 | kMIRDup, |
Yevgeny Rouban | 423b137 | 2014-10-15 17:32:25 +0700 | [diff] [blame] | 359 | kMIRMark, // Temporary node mark can be used by |
| 360 | // opt passes for their private needs. |
Jean Christophe Beyler | b5bce7c | 2014-07-25 12:32:18 -0700 | [diff] [blame] | 361 | kMIRStoreNonTemporal, |
Jean Christophe Beyler | 89fde26 | 2014-04-30 11:40:07 -0700 | [diff] [blame] | 362 | kMIRLastMIRFlag, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 363 | }; |
| 364 | |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 365 | // For successor_block_list. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 366 | enum BlockListType { |
| 367 | kNotUsed = 0, |
| 368 | kCatch, |
| 369 | kPackedSwitch, |
| 370 | kSparseSwitch, |
| 371 | }; |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 372 | std::ostream& operator<<(std::ostream& os, const BlockListType& rhs); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 373 | |
| 374 | enum AssemblerStatus { |
| 375 | kSuccess, |
| 376 | kRetryAll, |
| 377 | }; |
Ian Rogers | b28c1c0 | 2014-11-08 11:21:21 -0800 | [diff] [blame] | 378 | std::ostream& operator<<(std::ostream& os, const AssemblerStatus& rhs); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 379 | |
| 380 | enum OpSize { |
buzbee | 695d13a | 2014-04-19 13:32:20 -0700 | [diff] [blame] | 381 | kWord, // Natural word size of target (32/64). |
| 382 | k32, |
| 383 | k64, |
| 384 | kReference, // Object reference; compressed on 64-bit targets. |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 385 | kSingle, |
| 386 | kDouble, |
| 387 | kUnsignedHalf, |
| 388 | kSignedHalf, |
| 389 | kUnsignedByte, |
| 390 | kSignedByte, |
| 391 | }; |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 392 | std::ostream& operator<<(std::ostream& os, const OpSize& kind); |
| 393 | |
| 394 | enum OpKind { |
| 395 | kOpMov, |
Razvan A Lupusoru | bd288c2 | 2013-12-20 17:27:23 -0800 | [diff] [blame] | 396 | kOpCmov, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 397 | kOpMvn, |
| 398 | kOpCmp, |
| 399 | kOpLsl, |
| 400 | kOpLsr, |
| 401 | kOpAsr, |
| 402 | kOpRor, |
| 403 | kOpNot, |
| 404 | kOpAnd, |
| 405 | kOpOr, |
| 406 | kOpXor, |
| 407 | kOpNeg, |
| 408 | kOpAdd, |
| 409 | kOpAdc, |
| 410 | kOpSub, |
| 411 | kOpSbc, |
| 412 | kOpRsub, |
| 413 | kOpMul, |
| 414 | kOpDiv, |
| 415 | kOpRem, |
| 416 | kOpBic, |
| 417 | kOpCmn, |
| 418 | kOpTst, |
Vladimir Marko | a8b4caf | 2013-10-24 15:08:57 +0100 | [diff] [blame] | 419 | kOpRev, |
| 420 | kOpRevsh, |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 421 | kOpBkpt, |
| 422 | kOpBlx, |
| 423 | kOpPush, |
| 424 | kOpPop, |
| 425 | kOp2Char, |
| 426 | kOp2Short, |
| 427 | kOp2Byte, |
| 428 | kOpCondBr, |
| 429 | kOpUncondBr, |
| 430 | kOpBx, |
| 431 | kOpInvalid, |
| 432 | }; |
Ian Rogers | b28c1c0 | 2014-11-08 11:21:21 -0800 | [diff] [blame] | 433 | std::ostream& operator<<(std::ostream& os, const OpKind& rhs); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 434 | |
Razvan A Lupusoru | 2c498d1 | 2014-01-29 16:02:57 -0800 | [diff] [blame] | 435 | enum MoveType { |
| 436 | kMov8GP, // Move 8-bit general purpose register. |
| 437 | kMov16GP, // Move 16-bit general purpose register. |
| 438 | kMov32GP, // Move 32-bit general purpose register. |
| 439 | kMov64GP, // Move 64-bit general purpose register. |
| 440 | kMov32FP, // Move 32-bit FP register. |
| 441 | kMov64FP, // Move 64-bit FP register. |
| 442 | kMovLo64FP, // Move low 32-bits of 64-bit FP register. |
| 443 | kMovHi64FP, // Move high 32-bits of 64-bit FP register. |
| 444 | kMovU128FP, // Move 128-bit FP register to/from possibly unaligned region. |
| 445 | kMov128FP = kMovU128FP, |
| 446 | kMovA128FP, // Move 128-bit FP register to/from region surely aligned to 16-bytes. |
| 447 | kMovLo128FP, // Move low 64-bits of 128-bit FP register. |
| 448 | kMovHi128FP, // Move high 64-bits of 128-bit FP register. |
| 449 | }; |
Ian Rogers | b28c1c0 | 2014-11-08 11:21:21 -0800 | [diff] [blame] | 450 | std::ostream& operator<<(std::ostream& os, const MoveType& kind); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 451 | |
| 452 | enum ConditionCode { |
| 453 | kCondEq, // equal |
| 454 | kCondNe, // not equal |
Vladimir Marko | 58af1f9 | 2013-12-19 13:31:15 +0000 | [diff] [blame] | 455 | kCondCs, // carry set |
| 456 | kCondCc, // carry clear |
Vladimir Marko | 459f4df | 2013-12-20 17:03:09 +0000 | [diff] [blame] | 457 | kCondUlt, // unsigned less than |
| 458 | kCondUge, // unsigned greater than or same |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 459 | kCondMi, // minus |
| 460 | kCondPl, // plus, positive or zero |
| 461 | kCondVs, // overflow |
| 462 | kCondVc, // no overflow |
| 463 | kCondHi, // unsigned greater than |
| 464 | kCondLs, // unsigned lower or same |
| 465 | kCondGe, // signed greater than or equal |
| 466 | kCondLt, // signed less than |
| 467 | kCondGt, // signed greater than |
| 468 | kCondLe, // signed less than or equal |
| 469 | kCondAl, // always |
| 470 | kCondNv, // never |
| 471 | }; |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 472 | std::ostream& operator<<(std::ostream& os, const ConditionCode& kind); |
| 473 | |
| 474 | // Target specific condition encodings |
| 475 | enum ArmConditionCode { |
| 476 | kArmCondEq = 0x0, // 0000 |
| 477 | kArmCondNe = 0x1, // 0001 |
| 478 | kArmCondCs = 0x2, // 0010 |
| 479 | kArmCondCc = 0x3, // 0011 |
| 480 | kArmCondMi = 0x4, // 0100 |
| 481 | kArmCondPl = 0x5, // 0101 |
| 482 | kArmCondVs = 0x6, // 0110 |
| 483 | kArmCondVc = 0x7, // 0111 |
| 484 | kArmCondHi = 0x8, // 1000 |
| 485 | kArmCondLs = 0x9, // 1001 |
| 486 | kArmCondGe = 0xa, // 1010 |
| 487 | kArmCondLt = 0xb, // 1011 |
| 488 | kArmCondGt = 0xc, // 1100 |
| 489 | kArmCondLe = 0xd, // 1101 |
| 490 | kArmCondAl = 0xe, // 1110 |
| 491 | kArmCondNv = 0xf, // 1111 |
| 492 | }; |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 493 | std::ostream& operator<<(std::ostream& os, const ArmConditionCode& kind); |
| 494 | |
| 495 | enum X86ConditionCode { |
| 496 | kX86CondO = 0x0, // overflow |
| 497 | kX86CondNo = 0x1, // not overflow |
| 498 | |
| 499 | kX86CondB = 0x2, // below |
| 500 | kX86CondNae = kX86CondB, // not-above-equal |
| 501 | kX86CondC = kX86CondB, // carry |
| 502 | |
| 503 | kX86CondNb = 0x3, // not-below |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 504 | kX86CondAe = kX86CondNb, // above-equal |
| 505 | kX86CondNc = kX86CondNb, // not-carry |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 506 | |
| 507 | kX86CondZ = 0x4, // zero |
| 508 | kX86CondEq = kX86CondZ, // equal |
| 509 | |
| 510 | kX86CondNz = 0x5, // not-zero |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 511 | kX86CondNe = kX86CondNz, // not-equal |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 512 | |
| 513 | kX86CondBe = 0x6, // below-equal |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 514 | kX86CondNa = kX86CondBe, // not-above |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 515 | |
| 516 | kX86CondNbe = 0x7, // not-below-equal |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 517 | kX86CondA = kX86CondNbe, // above |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 518 | |
| 519 | kX86CondS = 0x8, // sign |
| 520 | kX86CondNs = 0x9, // not-sign |
| 521 | |
| 522 | kX86CondP = 0xa, // 8-bit parity even |
| 523 | kX86CondPE = kX86CondP, |
| 524 | |
| 525 | kX86CondNp = 0xb, // 8-bit parity odd |
| 526 | kX86CondPo = kX86CondNp, |
| 527 | |
| 528 | kX86CondL = 0xc, // less-than |
| 529 | kX86CondNge = kX86CondL, // not-greater-equal |
| 530 | |
| 531 | kX86CondNl = 0xd, // not-less-than |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 532 | kX86CondGe = kX86CondNl, // not-greater-equal |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 533 | |
| 534 | kX86CondLe = 0xe, // less-than-equal |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 535 | kX86CondNg = kX86CondLe, // not-greater |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 536 | |
| 537 | kX86CondNle = 0xf, // not-less-than |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 538 | kX86CondG = kX86CondNle, // greater |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 539 | }; |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 540 | std::ostream& operator<<(std::ostream& os, const X86ConditionCode& kind); |
| 541 | |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 542 | enum DividePattern { |
| 543 | DivideNone, |
| 544 | Divide3, |
| 545 | Divide5, |
| 546 | Divide7, |
| 547 | }; |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 548 | std::ostream& operator<<(std::ostream& os, const DividePattern& pattern); |
| 549 | |
Razvan A Lupusoru | 99ad723 | 2014-02-25 17:41:08 -0800 | [diff] [blame] | 550 | /** |
| 551 | * @brief Memory barrier types (see "The JSR-133 Cookbook for Compiler Writers"). |
Hans Boehm | 48f5c47 | 2014-06-27 14:50:10 -0700 | [diff] [blame] | 552 | * @details We define the combined barrier types that are actually required |
| 553 | * by the Java Memory Model, rather than using exactly the terminology from |
| 554 | * the JSR-133 cookbook. These should, in many cases, be replaced by acquire/release |
| 555 | * primitives. Note that the JSR-133 cookbook generally does not deal with |
| 556 | * store atomicity issues, and the recipes there are not always entirely sufficient. |
| 557 | * The current recipe is as follows: |
| 558 | * -# Use AnyStore ~= (LoadStore | StoreStore) ~= release barrier before volatile store. |
| 559 | * -# Use AnyAny barrier after volatile store. (StoreLoad is as expensive.) |
Calin Juravle | 52c4896 | 2014-12-16 17:02:57 +0000 | [diff] [blame] | 560 | * -# Use LoadAny barrier ~= (LoadLoad | LoadStore) ~= acquire barrier after each volatile load. |
Razvan A Lupusoru | 99ad723 | 2014-02-25 17:41:08 -0800 | [diff] [blame] | 561 | * -# Use StoreStore barrier after all stores but before return from any constructor whose |
Hans Boehm | 48f5c47 | 2014-06-27 14:50:10 -0700 | [diff] [blame] | 562 | * class has final fields. |
Jean Christophe Beyler | b5bce7c | 2014-07-25 12:32:18 -0700 | [diff] [blame] | 563 | * -# Use NTStoreStore to order non-temporal stores with respect to all later |
| 564 | * store-to-memory instructions. Only generated together with non-temporal stores. |
Razvan A Lupusoru | 99ad723 | 2014-02-25 17:41:08 -0800 | [diff] [blame] | 565 | */ |
buzbee | 1bc37c6 | 2012-11-20 13:35:41 -0800 | [diff] [blame] | 566 | enum MemBarrierKind { |
Hans Boehm | 48f5c47 | 2014-06-27 14:50:10 -0700 | [diff] [blame] | 567 | kAnyStore, |
| 568 | kLoadAny, |
buzbee | 1bc37c6 | 2012-11-20 13:35:41 -0800 | [diff] [blame] | 569 | kStoreStore, |
Jean Christophe Beyler | b5bce7c | 2014-07-25 12:32:18 -0700 | [diff] [blame] | 570 | kAnyAny, |
| 571 | kNTStoreStore, |
Vladimir Marko | a1de918 | 2016-02-25 11:37:38 +0000 | [diff] [blame] | 572 | kLastBarrierKind = kNTStoreStore |
buzbee | 1bc37c6 | 2012-11-20 13:35:41 -0800 | [diff] [blame] | 573 | }; |
buzbee | 1bc37c6 | 2012-11-20 13:35:41 -0800 | [diff] [blame] | 574 | std::ostream& operator<<(std::ostream& os, const MemBarrierKind& kind); |
| 575 | |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 576 | enum OpFeatureFlags { |
| 577 | kIsBranch = 0, |
| 578 | kNoOperand, |
| 579 | kIsUnaryOp, |
| 580 | kIsBinaryOp, |
| 581 | kIsTertiaryOp, |
| 582 | kIsQuadOp, |
| 583 | kIsQuinOp, |
| 584 | kIsSextupleOp, |
| 585 | kIsIT, |
Serban Constantinescu | 6399968 | 2014-07-15 17:44:21 +0100 | [diff] [blame] | 586 | kIsMoveOp, |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 587 | kMemLoad, |
| 588 | kMemStore, |
Serban Constantinescu | 6399968 | 2014-07-15 17:44:21 +0100 | [diff] [blame] | 589 | kMemVolatile, |
| 590 | kMemScaledx0, |
| 591 | kMemScaledx2, |
| 592 | kMemScaledx4, |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 593 | kPCRelFixup, // x86 FIXME: add NEEDS_FIXUP to instruction attributes. |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 594 | kRegDef0, |
| 595 | kRegDef1, |
Razvan A Lupusoru | 99ad723 | 2014-02-25 17:41:08 -0800 | [diff] [blame] | 596 | kRegDef2, |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 597 | kRegDefA, |
| 598 | kRegDefD, |
| 599 | kRegDefFPCSList0, |
| 600 | kRegDefFPCSList2, |
| 601 | kRegDefList0, |
| 602 | kRegDefList1, |
| 603 | kRegDefList2, |
| 604 | kRegDefLR, |
| 605 | kRegDefSP, |
| 606 | kRegUse0, |
| 607 | kRegUse1, |
| 608 | kRegUse2, |
| 609 | kRegUse3, |
| 610 | kRegUse4, |
| 611 | kRegUseA, |
| 612 | kRegUseC, |
| 613 | kRegUseD, |
Vladimir Marko | 70b797d | 2013-12-03 15:25:24 +0000 | [diff] [blame] | 614 | kRegUseB, |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 615 | kRegUseFPCSList0, |
| 616 | kRegUseFPCSList2, |
| 617 | kRegUseList0, |
| 618 | kRegUseList1, |
| 619 | kRegUseLR, |
| 620 | kRegUsePC, |
| 621 | kRegUseSP, |
| 622 | kSetsCCodes, |
Serguei Katkov | e90501d | 2014-03-12 15:56:54 +0700 | [diff] [blame] | 623 | kUsesCCodes, |
buzbee | 9da5c10 | 2014-03-28 12:59:18 -0700 | [diff] [blame] | 624 | kUseFpStack, |
| 625 | kUseHi, |
| 626 | kUseLo, |
| 627 | kDefHi, |
| 628 | kDefLo |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 629 | }; |
Ian Rogers | b28c1c0 | 2014-11-08 11:21:21 -0800 | [diff] [blame] | 630 | std::ostream& operator<<(std::ostream& os, const OpFeatureFlags& rhs); |
buzbee | 02031b1 | 2012-11-23 09:41:35 -0800 | [diff] [blame] | 631 | |
buzbee | f662a7c | 2013-02-12 16:19:43 -0800 | [diff] [blame] | 632 | enum SelectInstructionKind { |
| 633 | kSelectNone, |
| 634 | kSelectConst, |
| 635 | kSelectMove, |
| 636 | kSelectGoto |
| 637 | }; |
buzbee | a5abf70 | 2013-04-12 14:39:29 -0700 | [diff] [blame] | 638 | std::ostream& operator<<(std::ostream& os, const SelectInstructionKind& kind); |
| 639 | |
Mark Mendell | 27dee8b | 2014-12-01 19:06:12 -0500 | [diff] [blame] | 640 | // LIR fixup kinds for Arm and X86. |
buzbee | b48819d | 2013-09-14 16:15:25 -0700 | [diff] [blame] | 641 | enum FixupKind { |
| 642 | kFixupNone, |
Matteo Franchin | 65420b2 | 2014-10-27 13:29:30 +0000 | [diff] [blame] | 643 | kFixupLabel, // For labels we just adjust the offset. |
| 644 | kFixupLoad, // Mostly for immediates. |
| 645 | kFixupVLoad, // FP load which *may* be pc-relative. |
| 646 | kFixupCBxZ, // Cbz, Cbnz. |
| 647 | kFixupTBxZ, // Tbz, Tbnz. |
Matteo Franchin | 65420b2 | 2014-10-27 13:29:30 +0000 | [diff] [blame] | 648 | kFixupCondBranch, // Conditional branch |
| 649 | kFixupT1Branch, // Thumb1 Unconditional branch |
| 650 | kFixupT2Branch, // Thumb2 Unconditional branch |
| 651 | kFixupBlx1, // Blx1 (start of Blx1/Blx2 pair). |
| 652 | kFixupBl1, // Bl1 (start of Bl1/Bl2 pair). |
| 653 | kFixupAdr, // Adr. |
| 654 | kFixupMovImmLST, // kThumb2MovImm16LST. |
| 655 | kFixupMovImmHST, // kThumb2MovImm16HST. |
| 656 | kFixupAlign4, // Align to 4-byte boundary. |
| 657 | kFixupA53Erratum835769, // Cortex A53 Erratum 835769. |
Mark Mendell | 27dee8b | 2014-12-01 19:06:12 -0500 | [diff] [blame] | 658 | kFixupSwitchTable, // X86_64 packed switch table. |
buzbee | b48819d | 2013-09-14 16:15:25 -0700 | [diff] [blame] | 659 | }; |
buzbee | b48819d | 2013-09-14 16:15:25 -0700 | [diff] [blame] | 660 | std::ostream& operator<<(std::ostream& os, const FixupKind& kind); |
| 661 | |
Andreas Gampe | 3c12c51 | 2014-06-24 18:46:29 +0000 | [diff] [blame] | 662 | enum VolatileKind { |
| 663 | kNotVolatile, // Load/Store is not volatile |
| 664 | kVolatile // Load/Store is volatile |
| 665 | }; |
Andreas Gampe | 3c12c51 | 2014-06-24 18:46:29 +0000 | [diff] [blame] | 666 | std::ostream& operator<<(std::ostream& os, const VolatileKind& kind); |
| 667 | |
Andreas Gampe | ccc6026 | 2014-07-04 18:02:38 -0700 | [diff] [blame] | 668 | enum WideKind { |
| 669 | kNotWide, // Non-wide view |
| 670 | kWide, // Wide view |
| 671 | kRef // Ref width |
| 672 | }; |
Andreas Gampe | ccc6026 | 2014-07-04 18:02:38 -0700 | [diff] [blame] | 673 | std::ostream& operator<<(std::ostream& os, const WideKind& kind); |
| 674 | |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 675 | } // namespace art |
| 676 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 677 | #endif // ART_COMPILER_DEX_COMPILER_ENUMS_H_ |