Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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_QUICK_X86_CODEGEN_X86_H_ |
| 18 | #define ART_COMPILER_DEX_QUICK_X86_CODEGEN_X86_H_ |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 19 | |
| 20 | #include "dex/compiler_internals.h" |
| 21 | #include "x86_lir.h" |
| 22 | |
| 23 | namespace art { |
| 24 | |
Ian Rogers | e2143c0 | 2014-03-28 08:47:16 -0700 | [diff] [blame] | 25 | class X86Mir2Lir FINAL : public Mir2Lir { |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 26 | public: |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 27 | X86Mir2Lir(CompilationUnit* cu, MIRGraph* mir_graph, ArenaAllocator* arena); |
| 28 | |
| 29 | // Required for target - codegen helpers. |
buzbee | 11b63d1 | 2013-08-27 07:34:17 -0700 | [diff] [blame] | 30 | bool SmallLiteralDivRem(Instruction::Code dalvik_opcode, bool is_div, RegLocation rl_src, |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 31 | RegLocation rl_dest, int lit); |
Ian Rogers | e2143c0 | 2014-03-28 08:47:16 -0700 | [diff] [blame] | 32 | bool EasyMultiply(RegLocation rl_src, RegLocation rl_dest, int lit) OVERRIDE; |
Dave Allison | b373e09 | 2014-02-20 16:06:36 -0800 | [diff] [blame] | 33 | LIR* CheckSuspendUsingLoad() OVERRIDE; |
Ian Rogers | dd7624d | 2014-03-14 17:43:00 -0700 | [diff] [blame] | 34 | RegStorage LoadHelper(ThreadOffset<4> offset); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 35 | LIR* LoadBaseDisp(RegStorage r_base, int displacement, RegStorage r_dest, OpSize size, |
| 36 | int s_reg); |
| 37 | LIR* LoadBaseDispWide(RegStorage r_base, int displacement, RegStorage r_dest, int s_reg); |
| 38 | LIR* LoadBaseIndexed(RegStorage r_base, RegStorage r_index, RegStorage r_dest, int scale, |
| 39 | OpSize size); |
| 40 | // TODO: collapse r_dest, r_dest_hi |
| 41 | LIR* LoadBaseIndexedDisp(RegStorage r_base, RegStorage r_index, int scale, int displacement, |
| 42 | RegStorage r_dest, RegStorage r_dest_hi, OpSize size, int s_reg); |
| 43 | LIR* LoadConstantNoClobber(RegStorage r_dest, int value); |
| 44 | LIR* LoadConstantWide(RegStorage r_dest, int64_t value); |
| 45 | LIR* StoreBaseDisp(RegStorage r_base, int displacement, RegStorage r_src, OpSize size); |
| 46 | LIR* StoreBaseDispWide(RegStorage r_base, int displacement, RegStorage r_src); |
| 47 | LIR* StoreBaseIndexed(RegStorage r_base, RegStorage r_index, RegStorage r_src, int scale, |
| 48 | OpSize size); |
| 49 | // TODO: collapse r_src, r_src_hi |
| 50 | LIR* StoreBaseIndexedDisp(RegStorage r_base, RegStorage r_index, int scale, int displacement, |
| 51 | RegStorage r_src, RegStorage r_src_hi, OpSize size, int s_reg); |
| 52 | void MarkGCCard(RegStorage val_reg, RegStorage tgt_addr_reg); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 53 | |
| 54 | // Required for target - register utilities. |
| 55 | bool IsFpReg(int reg); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 56 | bool IsFpReg(RegStorage reg); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 57 | bool SameRegType(int reg1, int reg2); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 58 | RegStorage AllocTypedTemp(bool fp_hint, int reg_class); |
Bill Buzbee | 00e1ec6 | 2014-02-27 23:44:13 +0000 | [diff] [blame] | 59 | RegStorage AllocTypedTempWide(bool fp_hint, int reg_class); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 60 | int S2d(int low_reg, int high_reg); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 61 | RegStorage TargetReg(SpecialTargetRegister reg); |
| 62 | RegStorage GetArgMappingToPhysicalReg(int arg_num); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 63 | RegLocation GetReturnAlt(); |
| 64 | RegLocation GetReturnWideAlt(); |
| 65 | RegLocation LocCReturn(); |
| 66 | RegLocation LocCReturnDouble(); |
| 67 | RegLocation LocCReturnFloat(); |
| 68 | RegLocation LocCReturnWide(); |
| 69 | uint32_t FpRegMask(); |
| 70 | uint64_t GetRegMaskCommon(int reg); |
| 71 | void AdjustSpillMask(); |
Vladimir Marko | 31c2aac | 2013-12-09 16:31:19 +0000 | [diff] [blame] | 72 | void ClobberCallerSave(); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 73 | void FlushReg(RegStorage reg); |
| 74 | void FlushRegWide(RegStorage reg); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 75 | void FreeCallTemps(); |
| 76 | void FreeRegLocTemps(RegLocation rl_keep, RegLocation rl_free); |
| 77 | void LockCallTemps(); |
| 78 | void MarkPreservedSingle(int v_reg, int reg); |
| 79 | void CompilerInitializeRegAlloc(); |
| 80 | |
| 81 | // Required for target - miscellaneous. |
buzbee | b48819d | 2013-09-14 16:15:25 -0700 | [diff] [blame] | 82 | void AssembleLIR(); |
| 83 | int AssignInsnOffsets(); |
| 84 | void AssignOffsets(); |
buzbee | 0d82948 | 2013-10-11 15:24:55 -0700 | [diff] [blame] | 85 | AssemblerStatus AssembleInstructions(CodeOffset start_addr); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 86 | void DumpResourceMask(LIR* lir, uint64_t mask, const char* prefix); |
buzbee | b48819d | 2013-09-14 16:15:25 -0700 | [diff] [blame] | 87 | void SetupTargetResourceMasks(LIR* lir, uint64_t flags); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 88 | const char* GetTargetInstFmt(int opcode); |
| 89 | const char* GetTargetInstName(int opcode); |
| 90 | std::string BuildInsnString(const char* fmt, LIR* lir, unsigned char* base_addr); |
| 91 | uint64_t GetPCUseDefEncoding(); |
| 92 | uint64_t GetTargetInstFlags(int opcode); |
| 93 | int GetInsnSize(LIR* lir); |
| 94 | bool IsUnconditionalBranch(LIR* lir); |
| 95 | |
| 96 | // Required for target - Dalvik-level generators. |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 97 | void GenArithImmOpLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 98 | RegLocation rl_src2); |
| 99 | void GenArrayGet(int opt_flags, OpSize size, RegLocation rl_array, RegLocation rl_index, |
| 100 | RegLocation rl_dest, int scale); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 101 | void GenArrayPut(int opt_flags, OpSize size, RegLocation rl_array, |
Ian Rogers | a9a8254 | 2013-10-04 11:17:26 -0700 | [diff] [blame] | 102 | RegLocation rl_index, RegLocation rl_src, int scale, bool card_mark); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 103 | void GenShiftImmOpLong(Instruction::Code opcode, RegLocation rl_dest, |
Ian Rogers | a9a8254 | 2013-10-04 11:17:26 -0700 | [diff] [blame] | 104 | RegLocation rl_src1, RegLocation rl_shift); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 105 | void GenMulLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 106 | RegLocation rl_src2); |
| 107 | void GenAddLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 108 | RegLocation rl_src2); |
| 109 | void GenAndLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 110 | RegLocation rl_src2); |
| 111 | void GenArithOpDouble(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 112 | RegLocation rl_src2); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 113 | void GenArithOpFloat(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 114 | RegLocation rl_src2); |
| 115 | void GenCmpFP(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 116 | RegLocation rl_src2); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 117 | void GenConversion(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src); |
Vladimir Marko | 1c282e2 | 2013-11-21 14:49:47 +0000 | [diff] [blame] | 118 | bool GenInlinedCas(CallInfo* info, bool is_long, bool is_object); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 119 | bool GenInlinedMinMaxInt(CallInfo* info, bool is_min); |
| 120 | bool GenInlinedSqrt(CallInfo* info); |
Vladimir Marko | e508a20 | 2013-11-04 15:24:22 +0000 | [diff] [blame] | 121 | bool GenInlinedPeek(CallInfo* info, OpSize size); |
| 122 | bool GenInlinedPoke(CallInfo* info, OpSize size); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 123 | void GenNegLong(RegLocation rl_dest, RegLocation rl_src); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 124 | void GenOrLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 125 | RegLocation rl_src2); |
| 126 | void GenSubLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 127 | RegLocation rl_src2); |
| 128 | void GenXorLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, |
| 129 | RegLocation rl_src2); |
| 130 | LIR* GenRegMemCheck(ConditionCode c_code, RegStorage reg1, RegStorage base, int offset, |
| 131 | ThrowKind kind); |
| 132 | LIR* GenMemImmedCheck(ConditionCode c_code, RegStorage base, int offset, int check_value, |
Mark Mendell | 343adb5 | 2013-12-18 06:02:17 -0800 | [diff] [blame] | 133 | ThrowKind kind); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 134 | // TODO: collapse reg_lo, reg_hi |
| 135 | RegLocation GenDivRem(RegLocation rl_dest, RegStorage reg_lo, RegStorage reg_hi, bool is_div); |
| 136 | RegLocation GenDivRemLit(RegLocation rl_dest, RegStorage reg_lo, int lit, bool is_div); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 137 | void GenCmpLong(RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 138 | void GenDivZeroCheck(RegStorage reg); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 139 | void GenEntrySequence(RegLocation* ArgLocs, RegLocation rl_method); |
| 140 | void GenExitSequence(); |
Razvan A Lupusoru | 3bc0174 | 2014-02-06 13:18:43 -0800 | [diff] [blame] | 141 | void GenSpecialExitSequence(); |
buzbee | 0d82948 | 2013-10-11 15:24:55 -0700 | [diff] [blame] | 142 | void GenFillArrayData(DexOffset table_offset, RegLocation rl_src); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 143 | void GenFusedFPCmpBranch(BasicBlock* bb, MIR* mir, bool gt_bias, bool is_double); |
| 144 | void GenFusedLongCmpBranch(BasicBlock* bb, MIR* mir); |
| 145 | void GenSelect(BasicBlock* bb, MIR* mir); |
| 146 | void GenMemBarrier(MemBarrierKind barrier_kind); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 147 | void GenMoveException(RegLocation rl_dest); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 148 | void GenMultiplyByTwoBitMultiplier(RegLocation rl_src, RegLocation rl_result, int lit, |
| 149 | int first_bit, int second_bit); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 150 | void GenNegDouble(RegLocation rl_dest, RegLocation rl_src); |
| 151 | void GenNegFloat(RegLocation rl_dest, RegLocation rl_src); |
buzbee | 0d82948 | 2013-10-11 15:24:55 -0700 | [diff] [blame] | 152 | void GenPackedSwitch(MIR* mir, DexOffset table_offset, RegLocation rl_src); |
| 153 | void GenSparseSwitch(MIR* mir, DexOffset table_offset, RegLocation rl_src); |
Razvan A Lupusoru | 3bc0174 | 2014-02-06 13:18:43 -0800 | [diff] [blame] | 154 | |
Mark Mendell | e02d48f | 2014-01-15 11:19:23 -0800 | [diff] [blame] | 155 | /* |
| 156 | * @brief Generate a two address long operation with a constant value |
| 157 | * @param rl_dest location of result |
| 158 | * @param rl_src constant source operand |
| 159 | * @param op Opcode to be generated |
| 160 | */ |
| 161 | void GenLongImm(RegLocation rl_dest, RegLocation rl_src, Instruction::Code op); |
| 162 | /* |
| 163 | * @brief Generate a three address long operation with a constant value |
| 164 | * @param rl_dest location of result |
| 165 | * @param rl_src1 source operand |
| 166 | * @param rl_src2 constant source operand |
| 167 | * @param op Opcode to be generated |
| 168 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 169 | void GenLongLongImm(RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2, |
| 170 | Instruction::Code op); |
Mark Mendell | e02d48f | 2014-01-15 11:19:23 -0800 | [diff] [blame] | 171 | |
| 172 | /** |
| 173 | * @brief Generate a long arithmetic operation. |
| 174 | * @param rl_dest The destination. |
| 175 | * @param rl_src1 First operand. |
| 176 | * @param rl_src2 Second operand. |
| 177 | * @param op The DEX opcode for the operation. |
| 178 | * @param is_commutative The sources can be swapped if needed. |
| 179 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 180 | void GenLongArith(RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2, |
| 181 | Instruction::Code op, bool is_commutative); |
Mark Mendell | e02d48f | 2014-01-15 11:19:23 -0800 | [diff] [blame] | 182 | |
| 183 | /** |
| 184 | * @brief Generate a two operand long arithmetic operation. |
| 185 | * @param rl_dest The destination. |
| 186 | * @param rl_src Second operand. |
| 187 | * @param op The DEX opcode for the operation. |
| 188 | */ |
| 189 | void GenLongArith(RegLocation rl_dest, RegLocation rl_src, Instruction::Code op); |
| 190 | |
| 191 | /** |
| 192 | * @brief Generate a long operation. |
| 193 | * @param rl_dest The destination. Must be in a register |
| 194 | * @param rl_src The other operand. May be in a register or in memory. |
| 195 | * @param op The DEX opcode for the operation. |
| 196 | */ |
| 197 | void GenLongRegOrMemOp(RegLocation rl_dest, RegLocation rl_src, Instruction::Code op); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 198 | |
Mark Mendell | df8ee2e | 2014-01-27 16:37:47 -0800 | [diff] [blame] | 199 | /** |
| 200 | * @brief Implement instanceof a final class with x86 specific code. |
| 201 | * @param use_declaring_class 'true' if we can use the class itself. |
| 202 | * @param type_idx Type index to use if use_declaring_class is 'false'. |
| 203 | * @param rl_dest Result to be set to 0 or 1. |
| 204 | * @param rl_src Object to be tested. |
| 205 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 206 | void GenInstanceofFinal(bool use_declaring_class, uint32_t type_idx, RegLocation rl_dest, |
| 207 | RegLocation rl_src); |
Mark Mendell | 6607d97 | 2014-02-10 06:54:18 -0800 | [diff] [blame] | 208 | /* |
| 209 | * |
| 210 | * @brief Implement Set up instanceof a class with x86 specific code. |
| 211 | * @param needs_access_check 'true' if we must check the access. |
| 212 | * @param type_known_final 'true' if the type is known to be a final class. |
| 213 | * @param type_known_abstract 'true' if the type is known to be an abstract class. |
| 214 | * @param use_declaring_class 'true' if the type can be loaded off the current Method*. |
| 215 | * @param can_assume_type_is_in_dex_cache 'true' if the type is known to be in the cache. |
| 216 | * @param type_idx Type index to use if use_declaring_class is 'false'. |
| 217 | * @param rl_dest Result to be set to 0 or 1. |
| 218 | * @param rl_src Object to be tested. |
| 219 | */ |
| 220 | void GenInstanceofCallingHelper(bool needs_access_check, bool type_known_final, |
| 221 | bool type_known_abstract, bool use_declaring_class, |
| 222 | bool can_assume_type_is_in_dex_cache, |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 223 | uint32_t type_idx, RegLocation rl_dest, RegLocation rl_src); |
Mark Mendell | 6607d97 | 2014-02-10 06:54:18 -0800 | [diff] [blame] | 224 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 225 | // Single operation generators. |
| 226 | LIR* OpUnconditionalBranch(LIR* target); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 227 | LIR* OpCmpBranch(ConditionCode cond, RegStorage src1, RegStorage src2, LIR* target); |
| 228 | LIR* OpCmpImmBranch(ConditionCode cond, RegStorage reg, int check_value, LIR* target); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 229 | LIR* OpCondBranch(ConditionCode cc, LIR* target); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 230 | LIR* OpDecAndBranch(ConditionCode c_code, RegStorage reg, LIR* target); |
| 231 | LIR* OpFpRegCopy(RegStorage r_dest, RegStorage r_src); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 232 | LIR* OpIT(ConditionCode cond, const char* guide); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 233 | LIR* OpMem(OpKind op, RegStorage r_base, int disp); |
| 234 | LIR* OpPcRelLoad(RegStorage reg, LIR* target); |
| 235 | LIR* OpReg(OpKind op, RegStorage r_dest_src); |
| 236 | LIR* OpRegCopy(RegStorage r_dest, RegStorage r_src); |
| 237 | LIR* OpRegCopyNoInsert(RegStorage r_dest, RegStorage r_src); |
| 238 | LIR* OpRegImm(OpKind op, RegStorage r_dest_src1, int value); |
| 239 | LIR* OpRegMem(OpKind op, RegStorage r_dest, RegStorage r_base, int offset); |
| 240 | LIR* OpRegMem(OpKind op, RegStorage r_dest, RegLocation value); |
Mark Mendell | feb2b4e | 2014-01-28 12:59:49 -0800 | [diff] [blame] | 241 | LIR* OpMemReg(OpKind op, RegLocation rl_dest, int value); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 242 | LIR* OpRegReg(OpKind op, RegStorage r_dest_src1, RegStorage r_src2); |
| 243 | LIR* OpMovRegMem(RegStorage r_dest, RegStorage r_base, int offset, MoveType move_type); |
| 244 | LIR* OpMovMemReg(RegStorage r_base, int offset, RegStorage r_src, MoveType move_type); |
| 245 | LIR* OpCondRegReg(OpKind op, ConditionCode cc, RegStorage r_dest, RegStorage r_src); |
| 246 | LIR* OpRegRegImm(OpKind op, RegStorage r_dest, RegStorage r_src1, int value); |
| 247 | LIR* OpRegRegReg(OpKind op, RegStorage r_dest, RegStorage r_src1, RegStorage r_src2); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 248 | LIR* OpTestSuspend(LIR* target); |
Ian Rogers | dd7624d | 2014-03-14 17:43:00 -0700 | [diff] [blame] | 249 | LIR* OpThreadMem(OpKind op, ThreadOffset<4> thread_offset); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 250 | LIR* OpVldm(RegStorage r_base, int count); |
| 251 | LIR* OpVstm(RegStorage r_base, int count); |
| 252 | void OpLea(RegStorage r_base, RegStorage reg1, RegStorage reg2, int scale, int offset); |
| 253 | void OpRegCopyWide(RegStorage dest, RegStorage src); |
Ian Rogers | dd7624d | 2014-03-14 17:43:00 -0700 | [diff] [blame] | 254 | void OpTlsCmp(ThreadOffset<4> offset, int val); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 255 | |
Ian Rogers | dd7624d | 2014-03-14 17:43:00 -0700 | [diff] [blame] | 256 | void OpRegThreadMem(OpKind op, int r_dest, ThreadOffset<4> thread_offset); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 257 | void SpillCoreRegs(); |
| 258 | void UnSpillCoreRegs(); |
| 259 | static const X86EncodingMap EncodingMap[kX86Last]; |
| 260 | bool InexpensiveConstantInt(int32_t value); |
| 261 | bool InexpensiveConstantFloat(int32_t value); |
| 262 | bool InexpensiveConstantLong(int64_t value); |
| 263 | bool InexpensiveConstantDouble(int64_t value); |
| 264 | |
Bill Buzbee | d61ba4b | 2014-01-13 21:44:01 +0000 | [diff] [blame] | 265 | RegLocation UpdateLocWide(RegLocation loc); |
| 266 | RegLocation EvalLocWide(RegLocation loc, int reg_class, bool update); |
| 267 | RegLocation EvalLoc(RegLocation loc, int reg_class, bool update); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 268 | RegStorage AllocTempDouble(); |
Bill Buzbee | d61ba4b | 2014-01-13 21:44:01 +0000 | [diff] [blame] | 269 | void ResetDefLocWide(RegLocation rl); |
| 270 | |
Mark Mendell | feb2b4e | 2014-01-28 12:59:49 -0800 | [diff] [blame] | 271 | /* |
| 272 | * @brief x86 specific codegen for int operations. |
| 273 | * @param opcode Operation to perform. |
| 274 | * @param rl_dest Destination for the result. |
| 275 | * @param rl_lhs Left hand operand. |
| 276 | * @param rl_rhs Right hand operand. |
| 277 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 278 | void GenArithOpInt(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_lhs, |
| 279 | RegLocation rl_rhs); |
Mark Mendell | feb2b4e | 2014-01-28 12:59:49 -0800 | [diff] [blame] | 280 | |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 281 | /* |
| 282 | * @brief Dump a RegLocation using printf |
| 283 | * @param loc Register location to dump |
| 284 | */ |
| 285 | static void DumpRegLocation(RegLocation loc); |
| 286 | |
| 287 | /* |
| 288 | * @brief Load the Method* of a dex method into the register. |
Jeff Hao | 49161ce | 2014-03-12 11:05:25 -0700 | [diff] [blame] | 289 | * @param target_method The MethodReference of the method to be invoked. |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 290 | * @param type How the method will be invoked. |
| 291 | * @param register that will contain the code address. |
| 292 | * @note register will be passed to TargetReg to get physical register. |
| 293 | */ |
Jeff Hao | 49161ce | 2014-03-12 11:05:25 -0700 | [diff] [blame] | 294 | void LoadMethodAddress(const MethodReference& target_method, InvokeType type, |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 295 | SpecialTargetRegister symbolic_reg); |
| 296 | |
| 297 | /* |
| 298 | * @brief Load the Class* of a Dex Class type into the register. |
| 299 | * @param type How the method will be invoked. |
| 300 | * @param register that will contain the code address. |
| 301 | * @note register will be passed to TargetReg to get physical register. |
| 302 | */ |
| 303 | void LoadClassType(uint32_t type_idx, SpecialTargetRegister symbolic_reg); |
| 304 | |
| 305 | /* |
| 306 | * @brief Generate a relative call to the method that will be patched at link time. |
Jeff Hao | 49161ce | 2014-03-12 11:05:25 -0700 | [diff] [blame] | 307 | * @param target_method The MethodReference of the method to be invoked. |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 308 | * @param type How the method will be invoked. |
| 309 | * @returns Call instruction |
| 310 | */ |
Jeff Hao | 49161ce | 2014-03-12 11:05:25 -0700 | [diff] [blame] | 311 | LIR * CallWithLinkerFixup(const MethodReference& target_method, InvokeType type); |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 312 | |
| 313 | /* |
| 314 | * @brief Handle x86 specific literals |
| 315 | */ |
| 316 | void InstallLiteralPools(); |
| 317 | |
Mark Mendell | ae9fd93 | 2014-02-10 16:14:35 -0800 | [diff] [blame] | 318 | /* |
| 319 | * @brief Generate the debug_frame CFI information. |
| 320 | * @returns pointer to vector containing CFE information |
| 321 | */ |
| 322 | static std::vector<uint8_t>* ReturnCommonCallFrameInformation(); |
| 323 | |
| 324 | /* |
| 325 | * @brief Generate the debug_frame FDE information. |
| 326 | * @returns pointer to vector containing CFE information |
| 327 | */ |
| 328 | std::vector<uint8_t>* ReturnCallFrameInformation(); |
| 329 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 330 | private: |
Vladimir Marko | 057c74a | 2013-12-03 15:20:45 +0000 | [diff] [blame] | 331 | void EmitPrefix(const X86EncodingMap* entry); |
| 332 | void EmitOpcode(const X86EncodingMap* entry); |
| 333 | void EmitPrefixAndOpcode(const X86EncodingMap* entry); |
| 334 | void EmitDisp(uint8_t base, int disp); |
| 335 | void EmitModrmDisp(uint8_t reg_or_opcode, uint8_t base, int disp); |
| 336 | void EmitModrmSibDisp(uint8_t reg_or_opcode, uint8_t base, uint8_t index, int scale, int disp); |
| 337 | void EmitImm(const X86EncodingMap* entry, int imm); |
Vladimir Marko | a8b4caf | 2013-10-24 15:08:57 +0100 | [diff] [blame] | 338 | void EmitOpRegOpcode(const X86EncodingMap* entry, uint8_t reg); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 339 | void EmitOpReg(const X86EncodingMap* entry, uint8_t reg); |
| 340 | void EmitOpMem(const X86EncodingMap* entry, uint8_t base, int disp); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 341 | void EmitOpArray(const X86EncodingMap* entry, uint8_t base, uint8_t index, int scale, int disp); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 342 | void EmitMemReg(const X86EncodingMap* entry, uint8_t base, int disp, uint8_t reg); |
Mark Mendell | 343adb5 | 2013-12-18 06:02:17 -0800 | [diff] [blame] | 343 | void EmitMemImm(const X86EncodingMap* entry, uint8_t base, int disp, int32_t imm); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 344 | void EmitRegMem(const X86EncodingMap* entry, uint8_t reg, uint8_t base, int disp); |
| 345 | void EmitRegArray(const X86EncodingMap* entry, uint8_t reg, uint8_t base, uint8_t index, |
| 346 | int scale, int disp); |
| 347 | void EmitArrayReg(const X86EncodingMap* entry, uint8_t base, uint8_t index, int scale, int disp, |
| 348 | uint8_t reg); |
| 349 | void EmitRegThread(const X86EncodingMap* entry, uint8_t reg, int disp); |
| 350 | void EmitRegReg(const X86EncodingMap* entry, uint8_t reg1, uint8_t reg2); |
| 351 | void EmitRegRegImm(const X86EncodingMap* entry, uint8_t reg1, uint8_t reg2, int32_t imm); |
Mark Mendell | 4708dcd | 2014-01-22 09:05:18 -0800 | [diff] [blame] | 352 | void EmitRegRegImmRev(const X86EncodingMap* entry, uint8_t reg1, uint8_t reg2, int32_t imm); |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 353 | void EmitRegMemImm(const X86EncodingMap* entry, uint8_t reg1, uint8_t base, int disp, |
| 354 | int32_t imm); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 355 | void EmitRegImm(const X86EncodingMap* entry, uint8_t reg, int imm); |
| 356 | void EmitThreadImm(const X86EncodingMap* entry, int disp, int imm); |
| 357 | void EmitMovRegImm(const X86EncodingMap* entry, uint8_t reg, int imm); |
| 358 | void EmitShiftRegImm(const X86EncodingMap* entry, uint8_t reg, int imm); |
Mark Mendell | feb2b4e | 2014-01-28 12:59:49 -0800 | [diff] [blame] | 359 | void EmitShiftMemCl(const X86EncodingMap* entry, uint8_t base, int displacement, uint8_t cl); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 360 | void EmitShiftRegCl(const X86EncodingMap* entry, uint8_t reg, uint8_t cl); |
| 361 | void EmitRegCond(const X86EncodingMap* entry, uint8_t reg, uint8_t condition); |
Razvan A Lupusoru | bd288c2 | 2013-12-20 17:27:23 -0800 | [diff] [blame] | 362 | |
| 363 | /** |
| 364 | * @brief Used for encoding conditional register to register operation. |
| 365 | * @param entry The entry in the encoding map for the opcode. |
| 366 | * @param reg1 The first physical register. |
| 367 | * @param reg2 The second physical register. |
| 368 | * @param condition The condition code for operation. |
| 369 | */ |
| 370 | void EmitRegRegCond(const X86EncodingMap* entry, uint8_t reg1, uint8_t reg2, uint8_t condition); |
| 371 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 372 | void EmitJmp(const X86EncodingMap* entry, int rel); |
| 373 | void EmitJcc(const X86EncodingMap* entry, int rel, uint8_t cc); |
| 374 | void EmitCallMem(const X86EncodingMap* entry, uint8_t base, int disp); |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 375 | void EmitCallImmediate(const X86EncodingMap* entry, int disp); |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 376 | void EmitCallThread(const X86EncodingMap* entry, int disp); |
| 377 | void EmitPcRel(const X86EncodingMap* entry, uint8_t reg, int base_or_table, uint8_t index, |
| 378 | int scale, int table_or_disp); |
| 379 | void EmitMacro(const X86EncodingMap* entry, uint8_t reg, int offset); |
| 380 | void EmitUnimplemented(const X86EncodingMap* entry, LIR* lir); |
Mark Mendell | 412d4f8 | 2013-12-18 13:32:36 -0800 | [diff] [blame] | 381 | void GenFusedLongCmpImmBranch(BasicBlock* bb, RegLocation rl_src1, |
| 382 | int64_t val, ConditionCode ccode); |
Bill Buzbee | d61ba4b | 2014-01-13 21:44:01 +0000 | [diff] [blame] | 383 | void OpVectorRegCopyWide(uint8_t fp_reg, uint8_t low_reg, uint8_t high_reg); |
| 384 | void GenConstWide(RegLocation rl_dest, int64_t value); |
Mark Mendell | e02d48f | 2014-01-15 11:19:23 -0800 | [diff] [blame] | 385 | |
Razvan A Lupusoru | 99ad723 | 2014-02-25 17:41:08 -0800 | [diff] [blame] | 386 | static bool ProvidesFullMemoryBarrier(X86OpCode opcode); |
| 387 | |
Mark Mendell | e02d48f | 2014-01-15 11:19:23 -0800 | [diff] [blame] | 388 | /* |
Mark Mendell | 4028a6c | 2014-02-19 20:06:20 -0800 | [diff] [blame] | 389 | * @brief generate inline code for fast case of Strng.indexOf. |
| 390 | * @param info Call parameters |
| 391 | * @param zero_based 'true' if the index into the string is 0. |
| 392 | * @returns 'true' if the call was inlined, 'false' if a regular call needs to be |
| 393 | * generated. |
| 394 | */ |
| 395 | bool GenInlinedIndexOf(CallInfo* info, bool zero_based); |
| 396 | |
| 397 | /* |
Mark Mendell | e02d48f | 2014-01-15 11:19:23 -0800 | [diff] [blame] | 398 | * @brief Return the correct x86 opcode for the Dex operation |
| 399 | * @param op Dex opcode for the operation |
| 400 | * @param loc Register location of the operand |
| 401 | * @param is_high_op 'true' if this is an operation on the high word |
| 402 | * @param value Immediate value for the operation. Used for byte variants |
| 403 | * @returns the correct x86 opcode to perform the operation |
| 404 | */ |
| 405 | X86OpCode GetOpcode(Instruction::Code op, RegLocation loc, bool is_high_op, int32_t value); |
| 406 | |
| 407 | /* |
| 408 | * @brief Return the correct x86 opcode for the Dex operation |
| 409 | * @param op Dex opcode for the operation |
| 410 | * @param dest location of the destination. May be register or memory. |
| 411 | * @param rhs Location for the rhs of the operation. May be in register or memory. |
| 412 | * @param is_high_op 'true' if this is an operation on the high word |
| 413 | * @returns the correct x86 opcode to perform the operation |
| 414 | * @note at most one location may refer to memory |
| 415 | */ |
| 416 | X86OpCode GetOpcode(Instruction::Code op, RegLocation dest, RegLocation rhs, |
| 417 | bool is_high_op); |
| 418 | |
| 419 | /* |
| 420 | * @brief Is this operation a no-op for this opcode and value |
| 421 | * @param op Dex opcode for the operation |
| 422 | * @param value Immediate value for the operation. |
| 423 | * @returns 'true' if the operation will have no effect |
| 424 | */ |
| 425 | bool IsNoOp(Instruction::Code op, int32_t value); |
| 426 | |
Mark Mendell | 2bf31e6 | 2014-01-23 12:13:40 -0800 | [diff] [blame] | 427 | /** |
| 428 | * @brief Calculate magic number and shift for a given divisor |
| 429 | * @param divisor divisor number for calculation |
| 430 | * @param magic hold calculated magic number |
| 431 | * @param shift hold calculated shift |
| 432 | */ |
| 433 | void CalculateMagicAndShift(int divisor, int& magic, int& shift); |
| 434 | |
| 435 | /* |
| 436 | * @brief Generate an integer div or rem operation. |
| 437 | * @param rl_dest Destination Location. |
| 438 | * @param rl_src1 Numerator Location. |
| 439 | * @param rl_src2 Divisor Location. |
| 440 | * @param is_div 'true' if this is a division, 'false' for a remainder. |
| 441 | * @param check_zero 'true' if an exception should be generated if the divisor is 0. |
| 442 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 443 | RegLocation GenDivRem(RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2, |
| 444 | bool is_div, bool check_zero); |
Mark Mendell | 2bf31e6 | 2014-01-23 12:13:40 -0800 | [diff] [blame] | 445 | |
| 446 | /* |
| 447 | * @brief Generate an integer div or rem operation by a literal. |
| 448 | * @param rl_dest Destination Location. |
| 449 | * @param rl_src Numerator Location. |
| 450 | * @param lit Divisor. |
| 451 | * @param is_div 'true' if this is a division, 'false' for a remainder. |
| 452 | */ |
| 453 | RegLocation GenDivRemLit(RegLocation rl_dest, RegLocation rl_src, int lit, bool is_div); |
Mark Mendell | 4708dcd | 2014-01-22 09:05:18 -0800 | [diff] [blame] | 454 | |
| 455 | /* |
| 456 | * Generate code to implement long shift operations. |
| 457 | * @param opcode The DEX opcode to specify the shift type. |
| 458 | * @param rl_dest The destination. |
| 459 | * @param rl_src The value to be shifted. |
| 460 | * @param shift_amount How much to shift. |
| 461 | * @returns the RegLocation of the result. |
| 462 | */ |
| 463 | RegLocation GenShiftImmOpLong(Instruction::Code opcode, RegLocation rl_dest, |
| 464 | RegLocation rl_src, int shift_amount); |
| 465 | /* |
| 466 | * Generate an imul of a register by a constant or a better sequence. |
| 467 | * @param dest Destination Register. |
| 468 | * @param src Source Register. |
| 469 | * @param val Constant multiplier. |
| 470 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 471 | void GenImulRegImm(RegStorage dest, RegStorage src, int val); |
Mark Mendell | feb2b4e | 2014-01-28 12:59:49 -0800 | [diff] [blame] | 472 | |
Mark Mendell | 4708dcd | 2014-01-22 09:05:18 -0800 | [diff] [blame] | 473 | /* |
| 474 | * Generate an imul of a memory location by a constant or a better sequence. |
| 475 | * @param dest Destination Register. |
| 476 | * @param sreg Symbolic register. |
| 477 | * @param displacement Displacement on stack of Symbolic Register. |
| 478 | * @param val Constant multiplier. |
| 479 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 480 | void GenImulMemImm(RegStorage dest, int sreg, int displacement, int val); |
Mark Mendell | 766e929 | 2014-01-27 07:55:47 -0800 | [diff] [blame] | 481 | |
| 482 | /* |
| 483 | * @brief Compare memory to immediate, and branch if condition true. |
| 484 | * @param cond The condition code that when true will branch to the target. |
| 485 | * @param temp_reg A temporary register that can be used if compare memory is not |
| 486 | * supported by the architecture. |
| 487 | * @param base_reg The register holding the base address. |
| 488 | * @param offset The offset from the base. |
| 489 | * @param check_value The immediate to compare to. |
| 490 | */ |
buzbee | 2700f7e | 2014-03-07 09:46:20 -0800 | [diff] [blame] | 491 | LIR* OpCmpMemImmBranch(ConditionCode cond, RegStorage temp_reg, RegStorage base_reg, |
Mark Mendell | 766e929 | 2014-01-27 07:55:47 -0800 | [diff] [blame] | 492 | int offset, int check_value, LIR* target); |
Razvan A Lupusoru | 614c2b4 | 2014-01-28 17:05:21 -0800 | [diff] [blame] | 493 | |
Mark Mendell | feb2b4e | 2014-01-28 12:59:49 -0800 | [diff] [blame] | 494 | /* |
| 495 | * Can this operation be using core registers without temporaries? |
| 496 | * @param rl_lhs Left hand operand. |
| 497 | * @param rl_rhs Right hand operand. |
| 498 | * @returns 'true' if the operation can proceed without needing temporary regs. |
| 499 | */ |
| 500 | bool IsOperationSafeWithoutTemps(RegLocation rl_lhs, RegLocation rl_rhs); |
Mark Mendell | 67c39c4 | 2014-01-31 17:28:00 -0800 | [diff] [blame] | 501 | |
Razvan A Lupusoru | 614c2b4 | 2014-01-28 17:05:21 -0800 | [diff] [blame] | 502 | /** |
| 503 | * @brief Generates inline code for conversion of long to FP by using x87/ |
| 504 | * @param rl_dest The destination of the FP. |
| 505 | * @param rl_src The source of the long. |
| 506 | * @param is_double 'true' if dealing with double, 'false' for float. |
| 507 | */ |
| 508 | void GenLongToFP(RegLocation rl_dest, RegLocation rl_src, bool is_double); |
| 509 | |
Mark Mendell | 67c39c4 | 2014-01-31 17:28:00 -0800 | [diff] [blame] | 510 | /* |
| 511 | * @brief Perform MIR analysis before compiling method. |
| 512 | * @note Invokes Mir2LiR::Materialize after analysis. |
| 513 | */ |
| 514 | void Materialize(); |
| 515 | |
| 516 | /* |
| 517 | * @brief Analyze MIR before generating code, to prepare for the code generation. |
| 518 | */ |
| 519 | void AnalyzeMIR(); |
| 520 | |
| 521 | /* |
| 522 | * @brief Analyze one basic block. |
| 523 | * @param bb Basic block to analyze. |
| 524 | */ |
| 525 | void AnalyzeBB(BasicBlock * bb); |
| 526 | |
| 527 | /* |
| 528 | * @brief Analyze one extended MIR instruction |
| 529 | * @param opcode MIR instruction opcode. |
| 530 | * @param bb Basic block containing instruction. |
| 531 | * @param mir Extended instruction to analyze. |
| 532 | */ |
| 533 | void AnalyzeExtendedMIR(int opcode, BasicBlock * bb, MIR *mir); |
| 534 | |
| 535 | /* |
| 536 | * @brief Analyze one MIR instruction |
| 537 | * @param opcode MIR instruction opcode. |
| 538 | * @param bb Basic block containing instruction. |
| 539 | * @param mir Instruction to analyze. |
| 540 | */ |
| 541 | void AnalyzeMIR(int opcode, BasicBlock * bb, MIR *mir); |
| 542 | |
| 543 | /* |
| 544 | * @brief Analyze one MIR float/double instruction |
| 545 | * @param opcode MIR instruction opcode. |
| 546 | * @param bb Basic block containing instruction. |
| 547 | * @param mir Instruction to analyze. |
| 548 | */ |
| 549 | void AnalyzeFPInstruction(int opcode, BasicBlock * bb, MIR *mir); |
| 550 | |
| 551 | /* |
| 552 | * @brief Analyze one use of a double operand. |
| 553 | * @param rl_use Double RegLocation for the operand. |
| 554 | */ |
| 555 | void AnalyzeDoubleUse(RegLocation rl_use); |
| 556 | |
| 557 | // Information derived from analysis of MIR |
| 558 | |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 559 | // The compiler temporary for the code address of the method. |
| 560 | CompilerTemp *base_of_code_; |
| 561 | |
Mark Mendell | 67c39c4 | 2014-01-31 17:28:00 -0800 | [diff] [blame] | 562 | // Have we decided to compute a ptr to code and store in temporary VR? |
| 563 | bool store_method_addr_; |
| 564 | |
Mark Mendell | 55d0eac | 2014-02-06 11:02:52 -0800 | [diff] [blame] | 565 | // Have we used the stored method address? |
| 566 | bool store_method_addr_used_; |
| 567 | |
| 568 | // Instructions to remove if we didn't use the stored method address. |
| 569 | LIR* setup_method_address_[2]; |
| 570 | |
| 571 | // Instructions needing patching with Method* values. |
| 572 | GrowableArray<LIR*> method_address_insns_; |
| 573 | |
| 574 | // Instructions needing patching with Class Type* values. |
| 575 | GrowableArray<LIR*> class_type_address_insns_; |
| 576 | |
| 577 | // Instructions needing patching with PC relative code addresses. |
| 578 | GrowableArray<LIR*> call_method_insns_; |
Mark Mendell | ae9fd93 | 2014-02-10 16:14:35 -0800 | [diff] [blame] | 579 | |
| 580 | // Prologue decrement of stack pointer. |
| 581 | LIR* stack_decrement_; |
| 582 | |
| 583 | // Epilogue increment of stack pointer. |
| 584 | LIR* stack_increment_; |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 585 | }; |
| 586 | |
| 587 | } // namespace art |
| 588 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 589 | #endif // ART_COMPILER_DEX_QUICK_X86_CODEGEN_X86_H_ |