OLD | NEW |
---|---|
1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// | 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 TypeToRegisterSet[IceType_f64] = Float64Registers; | 324 TypeToRegisterSet[IceType_f64] = Float64Registers; |
325 TypeToRegisterSet[IceType_v4i1] = VectorRegisters; | 325 TypeToRegisterSet[IceType_v4i1] = VectorRegisters; |
326 TypeToRegisterSet[IceType_v8i1] = VectorRegisters; | 326 TypeToRegisterSet[IceType_v8i1] = VectorRegisters; |
327 TypeToRegisterSet[IceType_v16i1] = VectorRegisters; | 327 TypeToRegisterSet[IceType_v16i1] = VectorRegisters; |
328 TypeToRegisterSet[IceType_v16i8] = VectorRegisters; | 328 TypeToRegisterSet[IceType_v16i8] = VectorRegisters; |
329 TypeToRegisterSet[IceType_v8i16] = VectorRegisters; | 329 TypeToRegisterSet[IceType_v8i16] = VectorRegisters; |
330 TypeToRegisterSet[IceType_v4i32] = VectorRegisters; | 330 TypeToRegisterSet[IceType_v4i32] = VectorRegisters; |
331 TypeToRegisterSet[IceType_v4f32] = VectorRegisters; | 331 TypeToRegisterSet[IceType_v4f32] = VectorRegisters; |
332 | 332 |
333 filterTypeToRegisterSet( | 333 filterTypeToRegisterSet( |
334 Ctx, RegARM32::Reg_NUM, TypeToRegisterSet, RegARM32::RCARM32_NUM, | 334 Ctx, RegARM32::Reg_NUM, TypeToRegisterSet, |
335 [](int32_t RegNum) -> IceString { | 335 RegARM32::RCARM32_NUM, [](int32_t RegNum) -> IceString { |
Karl
2016/01/22 17:10:54
Isn't using RegARM32::RCARM32_NUM dangerous? The f
Jim Stichnoth
2016/01/22 19:02:17
Done - used a separate function a la x86, which sh
| |
336 // This function simply removes ", " from the register name. | |
336 IceString Name = RegARM32::getRegName(RegNum); | 337 IceString Name = RegARM32::getRegName(RegNum); |
337 constexpr const char RegSeparator[] = ", "; | 338 constexpr const char RegSeparator[] = ", "; |
338 constexpr size_t RegSeparatorWidth = | 339 constexpr size_t RegSeparatorWidth = |
339 llvm::array_lengthof(RegSeparator) - 1; | 340 llvm::array_lengthof(RegSeparator) - 1; |
340 for (size_t Pos = Name.find(RegSeparator); Pos != std::string::npos; | 341 for (size_t Pos = Name.find(RegSeparator); Pos != std::string::npos; |
341 Pos = Name.find(RegSeparator)) { | 342 Pos = Name.find(RegSeparator)) { |
342 Name.replace(Pos, RegSeparatorWidth, ":"); | 343 Name.replace(Pos, RegSeparatorWidth, ""); |
343 } | 344 } |
344 return Name; | 345 return Name; |
345 }); | 346 }, regClassString); |
346 } | 347 } |
347 | 348 |
348 namespace { | 349 namespace { |
349 void copyRegAllocFromInfWeightVariable64On32(const VarList &Vars) { | 350 void copyRegAllocFromInfWeightVariable64On32(const VarList &Vars) { |
350 for (Variable *Var : Vars) { | 351 for (Variable *Var : Vars) { |
351 auto *Var64 = llvm::dyn_cast<Variable64On32>(Var); | 352 auto *Var64 = llvm::dyn_cast<Variable64On32>(Var); |
352 if (!Var64) { | 353 if (!Var64) { |
353 // This is not the variable we are looking for. | 354 // This is not the variable we are looking for. |
354 continue; | 355 continue; |
355 } | 356 } |
(...skipping 6097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6453 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 6454 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
6454 // However, for compatibility with current NaCl LLVM, don't claim that. | 6455 // However, for compatibility with current NaCl LLVM, don't claim that. |
6455 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 6456 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
6456 } | 6457 } |
6457 | 6458 |
6458 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[IceType_NUM]; | 6459 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[IceType_NUM]; |
6459 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; | 6460 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; |
6460 | 6461 |
6461 } // end of namespace ARM32 | 6462 } // end of namespace ARM32 |
6462 } // end of namespace Ice | 6463 } // end of namespace Ice |
OLD | NEW |