Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [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_CODE_GENERATOR_MIPS64_H_ |
| 18 | #define ART_COMPILER_OPTIMIZING_CODE_GENERATOR_MIPS64_H_ |
| 19 | |
| 20 | #include "code_generator.h" |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 21 | #include "driver/compiler_options.h" |
| 22 | #include "nodes.h" |
| 23 | #include "parallel_move_resolver.h" |
| 24 | #include "utils/mips64/assembler_mips64.h" |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 25 | #include "utils/type_reference.h" |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 26 | |
| 27 | namespace art { |
| 28 | namespace mips64 { |
| 29 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 30 | // InvokeDexCallingConvention registers |
| 31 | |
| 32 | static constexpr GpuRegister kParameterCoreRegisters[] = |
| 33 | { A1, A2, A3, A4, A5, A6, A7 }; |
| 34 | static constexpr size_t kParameterCoreRegistersLength = arraysize(kParameterCoreRegisters); |
| 35 | |
| 36 | static constexpr FpuRegister kParameterFpuRegisters[] = |
| 37 | { F13, F14, F15, F16, F17, F18, F19 }; |
| 38 | static constexpr size_t kParameterFpuRegistersLength = arraysize(kParameterFpuRegisters); |
| 39 | |
| 40 | |
| 41 | // InvokeRuntimeCallingConvention registers |
| 42 | |
| 43 | static constexpr GpuRegister kRuntimeParameterCoreRegisters[] = |
| 44 | { A0, A1, A2, A3, A4, A5, A6, A7 }; |
| 45 | static constexpr size_t kRuntimeParameterCoreRegistersLength = |
| 46 | arraysize(kRuntimeParameterCoreRegisters); |
| 47 | |
| 48 | static constexpr FpuRegister kRuntimeParameterFpuRegisters[] = |
| 49 | { F12, F13, F14, F15, F16, F17, F18, F19 }; |
| 50 | static constexpr size_t kRuntimeParameterFpuRegistersLength = |
| 51 | arraysize(kRuntimeParameterFpuRegisters); |
| 52 | |
| 53 | |
| 54 | static constexpr GpuRegister kCoreCalleeSaves[] = |
Alexey Frunze | 627c1a0 | 2017-01-30 19:28:14 -0800 | [diff] [blame] | 55 | { S0, S1, S2, S3, S4, S5, S6, S7, GP, S8, RA }; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 56 | static constexpr FpuRegister kFpuCalleeSaves[] = |
| 57 | { F24, F25, F26, F27, F28, F29, F30, F31 }; |
| 58 | |
| 59 | |
| 60 | class CodeGeneratorMIPS64; |
| 61 | |
| 62 | class InvokeDexCallingConvention : public CallingConvention<GpuRegister, FpuRegister> { |
| 63 | public: |
| 64 | InvokeDexCallingConvention() |
| 65 | : CallingConvention(kParameterCoreRegisters, |
| 66 | kParameterCoreRegistersLength, |
| 67 | kParameterFpuRegisters, |
| 68 | kParameterFpuRegistersLength, |
| 69 | kMips64PointerSize) {} |
| 70 | |
| 71 | private: |
| 72 | DISALLOW_COPY_AND_ASSIGN(InvokeDexCallingConvention); |
| 73 | }; |
| 74 | |
| 75 | class InvokeDexCallingConventionVisitorMIPS64 : public InvokeDexCallingConventionVisitor { |
| 76 | public: |
| 77 | InvokeDexCallingConventionVisitorMIPS64() {} |
| 78 | virtual ~InvokeDexCallingConventionVisitorMIPS64() {} |
| 79 | |
| 80 | Location GetNextLocation(Primitive::Type type) OVERRIDE; |
| 81 | Location GetReturnLocation(Primitive::Type type) const OVERRIDE; |
| 82 | Location GetMethodLocation() const OVERRIDE; |
| 83 | |
| 84 | private: |
| 85 | InvokeDexCallingConvention calling_convention; |
| 86 | |
| 87 | DISALLOW_COPY_AND_ASSIGN(InvokeDexCallingConventionVisitorMIPS64); |
| 88 | }; |
| 89 | |
| 90 | class InvokeRuntimeCallingConvention : public CallingConvention<GpuRegister, FpuRegister> { |
| 91 | public: |
| 92 | InvokeRuntimeCallingConvention() |
| 93 | : CallingConvention(kRuntimeParameterCoreRegisters, |
| 94 | kRuntimeParameterCoreRegistersLength, |
| 95 | kRuntimeParameterFpuRegisters, |
| 96 | kRuntimeParameterFpuRegistersLength, |
| 97 | kMips64PointerSize) {} |
| 98 | |
| 99 | Location GetReturnLocation(Primitive::Type return_type); |
| 100 | |
| 101 | private: |
| 102 | DISALLOW_COPY_AND_ASSIGN(InvokeRuntimeCallingConvention); |
| 103 | }; |
| 104 | |
Calin Juravle | e460d1d | 2015-09-29 04:52:17 +0100 | [diff] [blame] | 105 | class FieldAccessCallingConventionMIPS64 : public FieldAccessCallingConvention { |
| 106 | public: |
| 107 | FieldAccessCallingConventionMIPS64() {} |
| 108 | |
| 109 | Location GetObjectLocation() const OVERRIDE { |
| 110 | return Location::RegisterLocation(A1); |
| 111 | } |
| 112 | Location GetFieldIndexLocation() const OVERRIDE { |
| 113 | return Location::RegisterLocation(A0); |
| 114 | } |
| 115 | Location GetReturnLocation(Primitive::Type type ATTRIBUTE_UNUSED) const OVERRIDE { |
Goran Jakovljevic | 8c34ec1 | 2015-10-14 11:23:48 +0200 | [diff] [blame] | 116 | return Location::RegisterLocation(V0); |
Calin Juravle | e460d1d | 2015-09-29 04:52:17 +0100 | [diff] [blame] | 117 | } |
Alexey Frunze | 0cb1242 | 2017-01-25 19:30:18 -0800 | [diff] [blame] | 118 | Location GetSetValueLocation(Primitive::Type type ATTRIBUTE_UNUSED, |
| 119 | bool is_instance) const OVERRIDE { |
| 120 | return is_instance |
Alexey Frunze | 00580bd | 2015-11-11 13:31:12 -0800 | [diff] [blame] | 121 | ? Location::RegisterLocation(A2) |
Alexey Frunze | 0cb1242 | 2017-01-25 19:30:18 -0800 | [diff] [blame] | 122 | : Location::RegisterLocation(A1); |
Calin Juravle | e460d1d | 2015-09-29 04:52:17 +0100 | [diff] [blame] | 123 | } |
| 124 | Location GetFpuLocation(Primitive::Type type ATTRIBUTE_UNUSED) const OVERRIDE { |
| 125 | return Location::FpuRegisterLocation(F0); |
| 126 | } |
| 127 | |
| 128 | private: |
| 129 | DISALLOW_COPY_AND_ASSIGN(FieldAccessCallingConventionMIPS64); |
| 130 | }; |
| 131 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 132 | class ParallelMoveResolverMIPS64 : public ParallelMoveResolverWithSwap { |
| 133 | public: |
| 134 | ParallelMoveResolverMIPS64(ArenaAllocator* allocator, CodeGeneratorMIPS64* codegen) |
| 135 | : ParallelMoveResolverWithSwap(allocator), codegen_(codegen) {} |
| 136 | |
| 137 | void EmitMove(size_t index) OVERRIDE; |
| 138 | void EmitSwap(size_t index) OVERRIDE; |
| 139 | void SpillScratch(int reg) OVERRIDE; |
| 140 | void RestoreScratch(int reg) OVERRIDE; |
| 141 | |
| 142 | void Exchange(int index1, int index2, bool double_slot); |
| 143 | |
| 144 | Mips64Assembler* GetAssembler() const; |
| 145 | |
| 146 | private: |
| 147 | CodeGeneratorMIPS64* const codegen_; |
| 148 | |
| 149 | DISALLOW_COPY_AND_ASSIGN(ParallelMoveResolverMIPS64); |
| 150 | }; |
| 151 | |
| 152 | class SlowPathCodeMIPS64 : public SlowPathCode { |
| 153 | public: |
David Srbecky | 9cd6d37 | 2016-02-09 15:24:47 +0000 | [diff] [blame] | 154 | explicit SlowPathCodeMIPS64(HInstruction* instruction) |
| 155 | : SlowPathCode(instruction), entry_label_(), exit_label_() {} |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 156 | |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 157 | Mips64Label* GetEntryLabel() { return &entry_label_; } |
| 158 | Mips64Label* GetExitLabel() { return &exit_label_; } |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 159 | |
| 160 | private: |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 161 | Mips64Label entry_label_; |
| 162 | Mips64Label exit_label_; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 163 | |
| 164 | DISALLOW_COPY_AND_ASSIGN(SlowPathCodeMIPS64); |
| 165 | }; |
| 166 | |
| 167 | class LocationsBuilderMIPS64 : public HGraphVisitor { |
| 168 | public: |
| 169 | LocationsBuilderMIPS64(HGraph* graph, CodeGeneratorMIPS64* codegen) |
| 170 | : HGraphVisitor(graph), codegen_(codegen) {} |
| 171 | |
| 172 | #define DECLARE_VISIT_INSTRUCTION(name, super) \ |
Alexandre Rames | f39e064 | 2015-06-23 11:33:45 +0100 | [diff] [blame] | 173 | void Visit##name(H##name* instr) OVERRIDE; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 174 | |
Alexandre Rames | f39e064 | 2015-06-23 11:33:45 +0100 | [diff] [blame] | 175 | FOR_EACH_CONCRETE_INSTRUCTION_COMMON(DECLARE_VISIT_INSTRUCTION) |
| 176 | FOR_EACH_CONCRETE_INSTRUCTION_MIPS64(DECLARE_VISIT_INSTRUCTION) |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 177 | |
| 178 | #undef DECLARE_VISIT_INSTRUCTION |
| 179 | |
Alexandre Rames | f39e064 | 2015-06-23 11:33:45 +0100 | [diff] [blame] | 180 | void VisitInstruction(HInstruction* instruction) OVERRIDE { |
| 181 | LOG(FATAL) << "Unreachable instruction " << instruction->DebugName() |
| 182 | << " (id " << instruction->GetId() << ")"; |
| 183 | } |
| 184 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 185 | private: |
| 186 | void HandleInvoke(HInvoke* invoke); |
| 187 | void HandleBinaryOp(HBinaryOperation* operation); |
Vladimir Marko | 5f7b58e | 2015-11-23 19:49:34 +0000 | [diff] [blame] | 188 | void HandleCondition(HCondition* instruction); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 189 | void HandleShift(HBinaryOperation* operation); |
| 190 | void HandleFieldSet(HInstruction* instruction, const FieldInfo& field_info); |
| 191 | void HandleFieldGet(HInstruction* instruction, const FieldInfo& field_info); |
Tijana Jakovljevic | ba89c34 | 2017-03-10 13:36:08 +0100 | [diff] [blame] | 192 | Location RegisterOrZeroConstant(HInstruction* instruction); |
| 193 | Location FpuRegisterOrConstantForStore(HInstruction* instruction); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 194 | |
| 195 | InvokeDexCallingConventionVisitorMIPS64 parameter_visitor_; |
| 196 | |
| 197 | CodeGeneratorMIPS64* const codegen_; |
| 198 | |
| 199 | DISALLOW_COPY_AND_ASSIGN(LocationsBuilderMIPS64); |
| 200 | }; |
| 201 | |
Aart Bik | 42249c3 | 2016-01-07 15:33:50 -0800 | [diff] [blame] | 202 | class InstructionCodeGeneratorMIPS64 : public InstructionCodeGenerator { |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 203 | public: |
| 204 | InstructionCodeGeneratorMIPS64(HGraph* graph, CodeGeneratorMIPS64* codegen); |
| 205 | |
| 206 | #define DECLARE_VISIT_INSTRUCTION(name, super) \ |
Alexandre Rames | f39e064 | 2015-06-23 11:33:45 +0100 | [diff] [blame] | 207 | void Visit##name(H##name* instr) OVERRIDE; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 208 | |
Alexandre Rames | f39e064 | 2015-06-23 11:33:45 +0100 | [diff] [blame] | 209 | FOR_EACH_CONCRETE_INSTRUCTION_COMMON(DECLARE_VISIT_INSTRUCTION) |
| 210 | FOR_EACH_CONCRETE_INSTRUCTION_MIPS64(DECLARE_VISIT_INSTRUCTION) |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 211 | |
| 212 | #undef DECLARE_VISIT_INSTRUCTION |
| 213 | |
Alexandre Rames | f39e064 | 2015-06-23 11:33:45 +0100 | [diff] [blame] | 214 | void VisitInstruction(HInstruction* instruction) OVERRIDE { |
| 215 | LOG(FATAL) << "Unreachable instruction " << instruction->DebugName() |
| 216 | << " (id " << instruction->GetId() << ")"; |
| 217 | } |
| 218 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 219 | Mips64Assembler* GetAssembler() const { return assembler_; } |
| 220 | |
Alexey Frunze | 0960ac5 | 2016-12-20 17:24:59 -0800 | [diff] [blame] | 221 | // Compare-and-jump packed switch generates approx. 3 + 2.5 * N 32-bit |
| 222 | // instructions for N cases. |
| 223 | // Table-based packed switch generates approx. 11 32-bit instructions |
| 224 | // and N 32-bit data words for N cases. |
| 225 | // At N = 6 they come out as 18 and 17 32-bit words respectively. |
| 226 | // We switch to the table-based method starting with 7 cases. |
| 227 | static constexpr uint32_t kPackedSwitchJumpTableThreshold = 6; |
| 228 | |
Chris Larsen | 5633ce7 | 2017-04-10 15:47:40 -0700 | [diff] [blame] | 229 | void GenerateMemoryBarrier(MemBarrierKind kind); |
| 230 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 231 | private: |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 232 | void GenerateClassInitializationCheck(SlowPathCodeMIPS64* slow_path, GpuRegister class_reg); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 233 | void GenerateSuspendCheck(HSuspendCheck* check, HBasicBlock* successor); |
| 234 | void HandleBinaryOp(HBinaryOperation* operation); |
Vladimir Marko | 5f7b58e | 2015-11-23 19:49:34 +0000 | [diff] [blame] | 235 | void HandleCondition(HCondition* instruction); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 236 | void HandleShift(HBinaryOperation* operation); |
Goran Jakovljevic | 8ed1826 | 2016-01-22 13:01:00 +0100 | [diff] [blame] | 237 | void HandleFieldSet(HInstruction* instruction, |
| 238 | const FieldInfo& field_info, |
| 239 | bool value_can_be_null); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 240 | void HandleFieldGet(HInstruction* instruction, const FieldInfo& field_info); |
Alexey Frunze | 1595815 | 2017-02-09 19:08:30 -0800 | [diff] [blame] | 241 | |
| 242 | // Generate a heap reference load using one register `out`: |
| 243 | // |
| 244 | // out <- *(out + offset) |
| 245 | // |
| 246 | // while honoring heap poisoning and/or read barriers (if any). |
| 247 | // |
| 248 | // Location `maybe_temp` is used when generating a read barrier and |
| 249 | // shall be a register in that case; it may be an invalid location |
| 250 | // otherwise. |
| 251 | void GenerateReferenceLoadOneRegister(HInstruction* instruction, |
| 252 | Location out, |
| 253 | uint32_t offset, |
| 254 | Location maybe_temp, |
| 255 | ReadBarrierOption read_barrier_option); |
| 256 | // Generate a heap reference load using two different registers |
| 257 | // `out` and `obj`: |
| 258 | // |
| 259 | // out <- *(obj + offset) |
| 260 | // |
| 261 | // while honoring heap poisoning and/or read barriers (if any). |
| 262 | // |
| 263 | // Location `maybe_temp` is used when generating a Baker's (fast |
| 264 | // path) read barrier and shall be a register in that case; it may |
| 265 | // be an invalid location otherwise. |
| 266 | void GenerateReferenceLoadTwoRegisters(HInstruction* instruction, |
| 267 | Location out, |
| 268 | Location obj, |
| 269 | uint32_t offset, |
| 270 | Location maybe_temp, |
| 271 | ReadBarrierOption read_barrier_option); |
| 272 | |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 273 | // Generate a GC root reference load: |
| 274 | // |
| 275 | // root <- *(obj + offset) |
| 276 | // |
| 277 | // while honoring read barriers (if any). |
| 278 | void GenerateGcRootFieldLoad(HInstruction* instruction, |
| 279 | Location root, |
| 280 | GpuRegister obj, |
Alexey Frunze | 1595815 | 2017-02-09 19:08:30 -0800 | [diff] [blame] | 281 | uint32_t offset, |
| 282 | ReadBarrierOption read_barrier_option); |
| 283 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 284 | void GenerateTestAndBranch(HInstruction* instruction, |
David Brazdil | 0debae7 | 2015-11-12 18:37:00 +0000 | [diff] [blame] | 285 | size_t condition_input_index, |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 286 | Mips64Label* true_target, |
| 287 | Mips64Label* false_target); |
Alexey Frunze | c857c74 | 2015-09-23 15:12:39 -0700 | [diff] [blame] | 288 | void DivRemOneOrMinusOne(HBinaryOperation* instruction); |
| 289 | void DivRemByPowerOfTwo(HBinaryOperation* instruction); |
| 290 | void GenerateDivRemWithAnyConstant(HBinaryOperation* instruction); |
| 291 | void GenerateDivRemIntegral(HBinaryOperation* instruction); |
Alexey Frunze | 299a939 | 2015-12-08 16:08:02 -0800 | [diff] [blame] | 292 | void GenerateIntLongCompare(IfCondition cond, bool is64bit, LocationSummary* locations); |
| 293 | void GenerateIntLongCompareAndBranch(IfCondition cond, |
| 294 | bool is64bit, |
| 295 | LocationSummary* locations, |
| 296 | Mips64Label* label); |
Tijana Jakovljevic | 4375819 | 2016-12-30 09:23:01 +0100 | [diff] [blame] | 297 | void GenerateFpCompare(IfCondition cond, |
| 298 | bool gt_bias, |
| 299 | Primitive::Type type, |
| 300 | LocationSummary* locations); |
Alexey Frunze | 299a939 | 2015-12-08 16:08:02 -0800 | [diff] [blame] | 301 | void GenerateFpCompareAndBranch(IfCondition cond, |
| 302 | bool gt_bias, |
| 303 | Primitive::Type type, |
| 304 | LocationSummary* locations, |
| 305 | Mips64Label* label); |
David Brazdil | fc6a86a | 2015-06-26 10:33:45 +0000 | [diff] [blame] | 306 | void HandleGoto(HInstruction* got, HBasicBlock* successor); |
Alexey Frunze | 0960ac5 | 2016-12-20 17:24:59 -0800 | [diff] [blame] | 307 | void GenPackedSwitchWithCompares(GpuRegister value_reg, |
| 308 | int32_t lower_bound, |
| 309 | uint32_t num_entries, |
| 310 | HBasicBlock* switch_block, |
| 311 | HBasicBlock* default_block); |
| 312 | void GenTableBasedPackedSwitch(GpuRegister value_reg, |
| 313 | int32_t lower_bound, |
| 314 | uint32_t num_entries, |
| 315 | HBasicBlock* switch_block, |
| 316 | HBasicBlock* default_block); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 317 | |
| 318 | Mips64Assembler* const assembler_; |
| 319 | CodeGeneratorMIPS64* const codegen_; |
| 320 | |
| 321 | DISALLOW_COPY_AND_ASSIGN(InstructionCodeGeneratorMIPS64); |
| 322 | }; |
| 323 | |
| 324 | class CodeGeneratorMIPS64 : public CodeGenerator { |
| 325 | public: |
| 326 | CodeGeneratorMIPS64(HGraph* graph, |
| 327 | const Mips64InstructionSetFeatures& isa_features, |
Serban Constantinescu | ecc4366 | 2015-08-13 13:33:12 +0100 | [diff] [blame] | 328 | const CompilerOptions& compiler_options, |
| 329 | OptimizingCompilerStats* stats = nullptr); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 330 | virtual ~CodeGeneratorMIPS64() {} |
| 331 | |
| 332 | void GenerateFrameEntry() OVERRIDE; |
| 333 | void GenerateFrameExit() OVERRIDE; |
| 334 | |
| 335 | void Bind(HBasicBlock* block) OVERRIDE; |
| 336 | |
Lazar Trsic | d967266 | 2015-09-03 17:33:01 +0200 | [diff] [blame] | 337 | size_t GetWordSize() const OVERRIDE { return kMips64DoublewordSize; } |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 338 | |
Lazar Trsic | d967266 | 2015-09-03 17:33:01 +0200 | [diff] [blame] | 339 | size_t GetFloatingPointSpillSlotSize() const OVERRIDE { return kMips64DoublewordSize; } |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 340 | |
Alexandre Rames | c01a664 | 2016-04-15 11:54:06 +0100 | [diff] [blame] | 341 | uintptr_t GetAddressOf(HBasicBlock* block) OVERRIDE { |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 342 | return assembler_.GetLabelLocation(GetLabelOf(block)); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 343 | } |
| 344 | |
| 345 | HGraphVisitor* GetLocationBuilder() OVERRIDE { return &location_builder_; } |
| 346 | HGraphVisitor* GetInstructionVisitor() OVERRIDE { return &instruction_visitor_; } |
| 347 | Mips64Assembler* GetAssembler() OVERRIDE { return &assembler_; } |
Alexandre Rames | eb7b739 | 2015-06-19 14:47:01 +0100 | [diff] [blame] | 348 | const Mips64Assembler& GetAssembler() const OVERRIDE { return assembler_; } |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 349 | |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 350 | // Emit linker patches. |
| 351 | void EmitLinkerPatches(ArenaVector<LinkerPatch>* linker_patches) OVERRIDE; |
Alexey Frunze | 627c1a0 | 2017-01-30 19:28:14 -0800 | [diff] [blame] | 352 | void EmitJitRootPatches(uint8_t* code, const uint8_t* roots_data) OVERRIDE; |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 353 | |
Alexey Frunze | 1595815 | 2017-02-09 19:08:30 -0800 | [diff] [blame] | 354 | // Fast path implementation of ReadBarrier::Barrier for a heap |
| 355 | // reference field load when Baker's read barriers are used. |
| 356 | void GenerateFieldLoadWithBakerReadBarrier(HInstruction* instruction, |
| 357 | Location ref, |
| 358 | GpuRegister obj, |
| 359 | uint32_t offset, |
| 360 | Location temp, |
| 361 | bool needs_null_check); |
| 362 | // Fast path implementation of ReadBarrier::Barrier for a heap |
| 363 | // reference array load when Baker's read barriers are used. |
| 364 | void GenerateArrayLoadWithBakerReadBarrier(HInstruction* instruction, |
| 365 | Location ref, |
| 366 | GpuRegister obj, |
| 367 | uint32_t data_offset, |
| 368 | Location index, |
| 369 | Location temp, |
| 370 | bool needs_null_check); |
| 371 | |
| 372 | // Factored implementation, used by GenerateFieldLoadWithBakerReadBarrier, |
| 373 | // GenerateArrayLoadWithBakerReadBarrier and some intrinsics. |
| 374 | // |
| 375 | // Load the object reference located at the address |
| 376 | // `obj + offset + (index << scale_factor)`, held by object `obj`, into |
| 377 | // `ref`, and mark it if needed. |
| 378 | // |
| 379 | // If `always_update_field` is true, the value of the reference is |
| 380 | // atomically updated in the holder (`obj`). |
| 381 | void GenerateReferenceLoadWithBakerReadBarrier(HInstruction* instruction, |
| 382 | Location ref, |
| 383 | GpuRegister obj, |
| 384 | uint32_t offset, |
| 385 | Location index, |
| 386 | ScaleFactor scale_factor, |
| 387 | Location temp, |
| 388 | bool needs_null_check, |
| 389 | bool always_update_field = false); |
| 390 | |
| 391 | // Generate a read barrier for a heap reference within `instruction` |
| 392 | // using a slow path. |
| 393 | // |
| 394 | // A read barrier for an object reference read from the heap is |
| 395 | // implemented as a call to the artReadBarrierSlow runtime entry |
| 396 | // point, which is passed the values in locations `ref`, `obj`, and |
| 397 | // `offset`: |
| 398 | // |
| 399 | // mirror::Object* artReadBarrierSlow(mirror::Object* ref, |
| 400 | // mirror::Object* obj, |
| 401 | // uint32_t offset); |
| 402 | // |
| 403 | // The `out` location contains the value returned by |
| 404 | // artReadBarrierSlow. |
| 405 | // |
| 406 | // When `index` is provided (i.e. for array accesses), the offset |
| 407 | // value passed to artReadBarrierSlow is adjusted to take `index` |
| 408 | // into account. |
| 409 | void GenerateReadBarrierSlow(HInstruction* instruction, |
| 410 | Location out, |
| 411 | Location ref, |
| 412 | Location obj, |
| 413 | uint32_t offset, |
| 414 | Location index = Location::NoLocation()); |
| 415 | |
| 416 | // If read barriers are enabled, generate a read barrier for a heap |
| 417 | // reference using a slow path. If heap poisoning is enabled, also |
| 418 | // unpoison the reference in `out`. |
| 419 | void MaybeGenerateReadBarrierSlow(HInstruction* instruction, |
| 420 | Location out, |
| 421 | Location ref, |
| 422 | Location obj, |
| 423 | uint32_t offset, |
| 424 | Location index = Location::NoLocation()); |
| 425 | |
| 426 | // Generate a read barrier for a GC root within `instruction` using |
| 427 | // a slow path. |
| 428 | // |
| 429 | // A read barrier for an object reference GC root is implemented as |
| 430 | // a call to the artReadBarrierForRootSlow runtime entry point, |
| 431 | // which is passed the value in location `root`: |
| 432 | // |
| 433 | // mirror::Object* artReadBarrierForRootSlow(GcRoot<mirror::Object>* root); |
| 434 | // |
| 435 | // The `out` location contains the value returned by |
| 436 | // artReadBarrierForRootSlow. |
| 437 | void GenerateReadBarrierForRootSlow(HInstruction* instruction, Location out, Location root); |
| 438 | |
Goran Jakovljevic | 8ed1826 | 2016-01-22 13:01:00 +0100 | [diff] [blame] | 439 | void MarkGCCard(GpuRegister object, GpuRegister value, bool value_can_be_null); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 440 | |
| 441 | // Register allocation. |
| 442 | |
David Brazdil | 58282f4 | 2016-01-14 12:45:10 +0000 | [diff] [blame] | 443 | void SetupBlockedRegisters() const OVERRIDE; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 444 | |
Roland Levillain | f41f956 | 2016-09-14 19:26:48 +0100 | [diff] [blame] | 445 | size_t SaveCoreRegister(size_t stack_index, uint32_t reg_id) OVERRIDE; |
| 446 | size_t RestoreCoreRegister(size_t stack_index, uint32_t reg_id) OVERRIDE; |
| 447 | size_t SaveFloatingPointRegister(size_t stack_index, uint32_t reg_id) OVERRIDE; |
| 448 | size_t RestoreFloatingPointRegister(size_t stack_index, uint32_t reg_id) OVERRIDE; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 449 | |
| 450 | void DumpCoreRegister(std::ostream& stream, int reg) const OVERRIDE; |
| 451 | void DumpFloatingPointRegister(std::ostream& stream, int reg) const OVERRIDE; |
| 452 | |
| 453 | InstructionSet GetInstructionSet() const OVERRIDE { return InstructionSet::kMips64; } |
| 454 | |
| 455 | const Mips64InstructionSetFeatures& GetInstructionSetFeatures() const { |
| 456 | return isa_features_; |
| 457 | } |
| 458 | |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 459 | Mips64Label* GetLabelOf(HBasicBlock* block) const { |
| 460 | return CommonGetLabelOf<Mips64Label>(block_labels_, block); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | void Initialize() OVERRIDE { |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 464 | block_labels_ = CommonInitializeLabels<Mips64Label>(); |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 465 | } |
| 466 | |
Alexey Frunze | c378980 | 2016-12-22 13:54:23 -0800 | [diff] [blame] | 467 | // We prefer aligned loads and stores (less code), so spill and restore registers in slow paths |
| 468 | // at aligned locations. |
| 469 | uint32_t GetPreferredSlotsAlignment() const OVERRIDE { return kMips64DoublewordSize; } |
| 470 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 471 | void Finalize(CodeAllocator* allocator) OVERRIDE; |
| 472 | |
| 473 | // Code generation helpers. |
Calin Juravle | e460d1d | 2015-09-29 04:52:17 +0100 | [diff] [blame] | 474 | void MoveLocation(Location dst, Location src, Primitive::Type dst_type) OVERRIDE; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 475 | |
Calin Juravle | 175dc73 | 2015-08-25 15:42:32 +0100 | [diff] [blame] | 476 | void MoveConstant(Location destination, int32_t value) OVERRIDE; |
| 477 | |
Calin Juravle | e460d1d | 2015-09-29 04:52:17 +0100 | [diff] [blame] | 478 | void AddLocationAsTemp(Location location, LocationSummary* locations) OVERRIDE; |
| 479 | |
| 480 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 481 | void SwapLocations(Location loc1, Location loc2, Primitive::Type type); |
| 482 | |
| 483 | // Generate code to invoke a runtime entry point. |
Calin Juravle | 175dc73 | 2015-08-25 15:42:32 +0100 | [diff] [blame] | 484 | void InvokeRuntime(QuickEntrypointEnum entrypoint, |
| 485 | HInstruction* instruction, |
| 486 | uint32_t dex_pc, |
Serban Constantinescu | fc73408 | 2016-07-19 17:18:07 +0100 | [diff] [blame] | 487 | SlowPathCode* slow_path = nullptr) OVERRIDE; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 488 | |
Alexey Frunze | 1595815 | 2017-02-09 19:08:30 -0800 | [diff] [blame] | 489 | // Generate code to invoke a runtime entry point, but do not record |
| 490 | // PC-related information in a stack map. |
| 491 | void InvokeRuntimeWithoutRecordingPcInfo(int32_t entry_point_offset, |
| 492 | HInstruction* instruction, |
| 493 | SlowPathCode* slow_path); |
| 494 | |
| 495 | void GenerateInvokeRuntime(int32_t entry_point_offset); |
| 496 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 497 | ParallelMoveResolver* GetMoveResolver() OVERRIDE { return &move_resolver_; } |
| 498 | |
Roland Levillain | f41f956 | 2016-09-14 19:26:48 +0100 | [diff] [blame] | 499 | bool NeedsTwoRegisters(Primitive::Type type ATTRIBUTE_UNUSED) const OVERRIDE { return false; } |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 500 | |
Vladimir Marko | cac5a7e | 2016-02-22 10:39:50 +0000 | [diff] [blame] | 501 | // Check if the desired_string_load_kind is supported. If it is, return it, |
| 502 | // otherwise return a fall-back kind that should be used instead. |
| 503 | HLoadString::LoadKind GetSupportedLoadStringKind( |
| 504 | HLoadString::LoadKind desired_string_load_kind) OVERRIDE; |
| 505 | |
Vladimir Marko | dbb7f5b | 2016-03-30 13:23:58 +0100 | [diff] [blame] | 506 | // Check if the desired_class_load_kind is supported. If it is, return it, |
| 507 | // otherwise return a fall-back kind that should be used instead. |
| 508 | HLoadClass::LoadKind GetSupportedLoadClassKind( |
| 509 | HLoadClass::LoadKind desired_class_load_kind) OVERRIDE; |
| 510 | |
Vladimir Marko | dc151b2 | 2015-10-15 18:02:30 +0100 | [diff] [blame] | 511 | // Check if the desired_dispatch_info is supported. If it is, return it, |
| 512 | // otherwise return a fall-back info that should be used instead. |
| 513 | HInvokeStaticOrDirect::DispatchInfo GetSupportedInvokeStaticOrDirectDispatch( |
| 514 | const HInvokeStaticOrDirect::DispatchInfo& desired_dispatch_info, |
Nicolas Geoffray | 5e4e11e | 2016-09-22 13:17:41 +0100 | [diff] [blame] | 515 | HInvokeStaticOrDirect* invoke) OVERRIDE; |
Vladimir Marko | dc151b2 | 2015-10-15 18:02:30 +0100 | [diff] [blame] | 516 | |
Andreas Gampe | 85b62f2 | 2015-09-09 13:15:38 -0700 | [diff] [blame] | 517 | void GenerateStaticOrDirectCall(HInvokeStaticOrDirect* invoke, Location temp) OVERRIDE; |
Alexey Frunze | 53afca1 | 2015-11-05 16:34:23 -0800 | [diff] [blame] | 518 | void GenerateVirtualCall(HInvokeVirtual* invoke, Location temp) OVERRIDE; |
Andreas Gampe | 85b62f2 | 2015-09-09 13:15:38 -0700 | [diff] [blame] | 519 | |
| 520 | void MoveFromReturnRegister(Location trg ATTRIBUTE_UNUSED, |
| 521 | Primitive::Type type ATTRIBUTE_UNUSED) OVERRIDE { |
Chris Larsen | 3acee73 | 2015-11-18 13:31:08 -0800 | [diff] [blame] | 522 | UNIMPLEMENTED(FATAL) << "Not implemented on MIPS64"; |
Andreas Gampe | 85b62f2 | 2015-09-09 13:15:38 -0700 | [diff] [blame] | 523 | } |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 524 | |
Roland Levillain | f41f956 | 2016-09-14 19:26:48 +0100 | [diff] [blame] | 525 | void GenerateNop() OVERRIDE; |
| 526 | void GenerateImplicitNullCheck(HNullCheck* instruction) OVERRIDE; |
| 527 | void GenerateExplicitNullCheck(HNullCheck* instruction) OVERRIDE; |
David Srbecky | c7098ff | 2016-02-09 14:30:11 +0000 | [diff] [blame] | 528 | |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 529 | // The PcRelativePatchInfo is used for PC-relative addressing of dex cache arrays, |
| 530 | // boot image strings and method calls. The only difference is the interpretation of |
| 531 | // the offset_or_index. |
| 532 | struct PcRelativePatchInfo { |
| 533 | PcRelativePatchInfo(const DexFile& dex_file, uint32_t off_or_idx) |
| 534 | : target_dex_file(dex_file), offset_or_index(off_or_idx) { } |
| 535 | PcRelativePatchInfo(PcRelativePatchInfo&& other) = default; |
| 536 | |
| 537 | const DexFile& target_dex_file; |
| 538 | // Either the dex cache array element offset or the string/type/method index. |
| 539 | uint32_t offset_or_index; |
| 540 | // Label for the auipc instruction. |
| 541 | Mips64Label pc_rel_label; |
| 542 | }; |
| 543 | |
Vladimir Marko | 6bec91c | 2017-01-09 15:03:12 +0000 | [diff] [blame] | 544 | PcRelativePatchInfo* NewPcRelativeStringPatch(const DexFile& dex_file, |
| 545 | dex::StringIndex string_index); |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 546 | PcRelativePatchInfo* NewPcRelativeTypePatch(const DexFile& dex_file, dex::TypeIndex type_index); |
Vladimir Marko | 1998cd0 | 2017-01-13 13:02:58 +0000 | [diff] [blame] | 547 | PcRelativePatchInfo* NewTypeBssEntryPatch(const DexFile& dex_file, dex::TypeIndex type_index); |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 548 | PcRelativePatchInfo* NewPcRelativeDexCacheArrayPatch(const DexFile& dex_file, |
| 549 | uint32_t element_offset); |
| 550 | PcRelativePatchInfo* NewPcRelativeCallPatch(const DexFile& dex_file, |
| 551 | uint32_t method_index); |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 552 | Literal* DeduplicateBootImageStringLiteral(const DexFile& dex_file, |
| 553 | dex::StringIndex string_index); |
| 554 | Literal* DeduplicateBootImageTypeLiteral(const DexFile& dex_file, dex::TypeIndex type_index); |
| 555 | Literal* DeduplicateBootImageAddressLiteral(uint64_t address); |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 556 | |
| 557 | void EmitPcRelativeAddressPlaceholderHigh(PcRelativePatchInfo* info, GpuRegister out); |
| 558 | |
Alexey Frunze | 627c1a0 | 2017-01-30 19:28:14 -0800 | [diff] [blame] | 559 | void PatchJitRootUse(uint8_t* code, |
| 560 | const uint8_t* roots_data, |
| 561 | const Literal* literal, |
| 562 | uint64_t index_in_table) const; |
| 563 | Literal* DeduplicateJitStringLiteral(const DexFile& dex_file, |
| 564 | dex::StringIndex string_index, |
| 565 | Handle<mirror::String> handle); |
| 566 | Literal* DeduplicateJitClassLiteral(const DexFile& dex_file, |
| 567 | dex::TypeIndex type_index, |
| 568 | Handle<mirror::Class> handle); |
| 569 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 570 | private: |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 571 | using Uint32ToLiteralMap = ArenaSafeMap<uint32_t, Literal*>; |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 572 | using Uint64ToLiteralMap = ArenaSafeMap<uint64_t, Literal*>; |
| 573 | using MethodToLiteralMap = ArenaSafeMap<MethodReference, Literal*, MethodReferenceComparator>; |
Alexey Frunze | 627c1a0 | 2017-01-30 19:28:14 -0800 | [diff] [blame] | 574 | using StringToLiteralMap = ArenaSafeMap<StringReference, |
| 575 | Literal*, |
| 576 | StringReferenceValueComparator>; |
| 577 | using TypeToLiteralMap = ArenaSafeMap<TypeReference, |
| 578 | Literal*, |
| 579 | TypeReferenceValueComparator>; |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 580 | using BootStringToLiteralMap = ArenaSafeMap<StringReference, |
| 581 | Literal*, |
| 582 | StringReferenceValueComparator>; |
| 583 | using BootTypeToLiteralMap = ArenaSafeMap<TypeReference, |
| 584 | Literal*, |
| 585 | TypeReferenceValueComparator>; |
| 586 | |
| 587 | Literal* DeduplicateUint32Literal(uint32_t value, Uint32ToLiteralMap* map); |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 588 | Literal* DeduplicateUint64Literal(uint64_t value); |
| 589 | Literal* DeduplicateMethodLiteral(MethodReference target_method, MethodToLiteralMap* map); |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 590 | |
| 591 | PcRelativePatchInfo* NewPcRelativePatch(const DexFile& dex_file, |
| 592 | uint32_t offset_or_index, |
| 593 | ArenaDeque<PcRelativePatchInfo>* patches); |
| 594 | |
| 595 | template <LinkerPatch (*Factory)(size_t, const DexFile*, uint32_t, uint32_t)> |
| 596 | void EmitPcRelativeLinkerPatches(const ArenaDeque<PcRelativePatchInfo>& infos, |
| 597 | ArenaVector<LinkerPatch>* linker_patches); |
| 598 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 599 | // Labels for each block that will be compiled. |
Alexey Frunze | a0e87b0 | 2015-09-24 22:57:20 -0700 | [diff] [blame] | 600 | Mips64Label* block_labels_; // Indexed by block id. |
| 601 | Mips64Label frame_entry_label_; |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 602 | LocationsBuilderMIPS64 location_builder_; |
| 603 | InstructionCodeGeneratorMIPS64 instruction_visitor_; |
| 604 | ParallelMoveResolverMIPS64 move_resolver_; |
| 605 | Mips64Assembler assembler_; |
| 606 | const Mips64InstructionSetFeatures& isa_features_; |
| 607 | |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 608 | // Deduplication map for 32-bit literals, used for non-patchable boot image addresses. |
| 609 | Uint32ToLiteralMap uint32_literals_; |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 610 | // Deduplication map for 64-bit literals, used for non-patchable method address or method code |
| 611 | // address. |
| 612 | Uint64ToLiteralMap uint64_literals_; |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 613 | // PC-relative patch info. |
| 614 | ArenaDeque<PcRelativePatchInfo> pc_relative_dex_cache_patches_; |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 615 | // Deduplication map for boot string literals for kBootImageLinkTimeAddress. |
| 616 | BootStringToLiteralMap boot_image_string_patches_; |
| 617 | // PC-relative String patch info; type depends on configuration (app .bss or boot image PIC). |
| 618 | ArenaDeque<PcRelativePatchInfo> pc_relative_string_patches_; |
| 619 | // Deduplication map for boot type literals for kBootImageLinkTimeAddress. |
| 620 | BootTypeToLiteralMap boot_image_type_patches_; |
Vladimir Marko | 1998cd0 | 2017-01-13 13:02:58 +0000 | [diff] [blame] | 621 | // PC-relative type patch info for kBootImageLinkTimePcRelative. |
Alexey Frunze | f63f569 | 2016-12-13 17:43:11 -0800 | [diff] [blame] | 622 | ArenaDeque<PcRelativePatchInfo> pc_relative_type_patches_; |
Vladimir Marko | 1998cd0 | 2017-01-13 13:02:58 +0000 | [diff] [blame] | 623 | // PC-relative type patch info for kBssEntry. |
| 624 | ArenaDeque<PcRelativePatchInfo> type_bss_entry_patches_; |
Alexey Frunze | 627c1a0 | 2017-01-30 19:28:14 -0800 | [diff] [blame] | 625 | // Patches for string root accesses in JIT compiled code. |
| 626 | StringToLiteralMap jit_string_patches_; |
| 627 | // Patches for class root accesses in JIT compiled code. |
| 628 | TypeToLiteralMap jit_class_patches_; |
Alexey Frunze | 19f6c69 | 2016-11-30 19:19:55 -0800 | [diff] [blame] | 629 | |
Alexey Frunze | 4dda337 | 2015-06-01 18:31:49 -0700 | [diff] [blame] | 630 | DISALLOW_COPY_AND_ASSIGN(CodeGeneratorMIPS64); |
| 631 | }; |
| 632 | |
| 633 | } // namespace mips64 |
| 634 | } // namespace art |
| 635 | |
| 636 | #endif // ART_COMPILER_OPTIMIZING_CODE_GENERATOR_MIPS64_H_ |