| 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 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 // TODO(jvoung): handled folding opportunities. Sign and zero extension | 2498 // TODO(jvoung): handled folding opportunities. Sign and zero extension |
| 2499 // can be folded into a load. | 2499 // can be folded into a load. |
| 2500 InstAssign *Assign = InstAssign::create(Func, DestLoad, Src0); | 2500 InstAssign *Assign = InstAssign::create(Func, DestLoad, Src0); |
| 2501 lowerAssign(Assign); | 2501 lowerAssign(Assign); |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 void TargetARM32::doAddressOptLoad() { | 2504 void TargetARM32::doAddressOptLoad() { |
| 2505 UnimplementedError(Func->getContext()->getFlags()); | 2505 UnimplementedError(Func->getContext()->getFlags()); |
| 2506 } | 2506 } |
| 2507 | 2507 |
| 2508 void TargetARM32::randomlyInsertNop(float Probability) { | 2508 void TargetARM32::randomlyInsertNop(float Probability, |
| 2509 RandomNumberGeneratorWrapper RNG(Ctx->getRNG()); | 2509 RandomNumberGenerator &RNG) { |
| 2510 if (RNG.getTrueWithProbability(Probability)) { | 2510 RandomNumberGeneratorWrapper RNGW(RNG); |
| 2511 if (RNGW.getTrueWithProbability(Probability)) { |
| 2511 UnimplementedError(Func->getContext()->getFlags()); | 2512 UnimplementedError(Func->getContext()->getFlags()); |
| 2512 } | 2513 } |
| 2513 } | 2514 } |
| 2514 | 2515 |
| 2515 void TargetARM32::lowerPhi(const InstPhi * /*Inst*/) { | 2516 void TargetARM32::lowerPhi(const InstPhi * /*Inst*/) { |
| 2516 Func->setError("Phi found in regular instruction list"); | 2517 Func->setError("Phi found in regular instruction list"); |
| 2517 } | 2518 } |
| 2518 | 2519 |
| 2519 void TargetARM32::lowerRet(const InstRet *Inst) { | 2520 void TargetARM32::lowerRet(const InstRet *Inst) { |
| 2520 Variable *Reg = nullptr; | 2521 Variable *Reg = nullptr; |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2922 } | 2923 } |
| 2923 | 2924 |
| 2924 void TargetARM32::postLower() { | 2925 void TargetARM32::postLower() { |
| 2925 if (Ctx->getFlags().getOptLevel() == Opt_m1) | 2926 if (Ctx->getFlags().getOptLevel() == Opt_m1) |
| 2926 return; | 2927 return; |
| 2927 inferTwoAddress(); | 2928 inferTwoAddress(); |
| 2928 } | 2929 } |
| 2929 | 2930 |
| 2930 void TargetARM32::makeRandomRegisterPermutation( | 2931 void TargetARM32::makeRandomRegisterPermutation( |
| 2931 llvm::SmallVectorImpl<int32_t> &Permutation, | 2932 llvm::SmallVectorImpl<int32_t> &Permutation, |
| 2932 const llvm::SmallBitVector &ExcludeRegisters) const { | 2933 const llvm::SmallBitVector &ExcludeRegisters, uint64_t Salt) const { |
| 2933 (void)Permutation; | 2934 (void)Permutation; |
| 2934 (void)ExcludeRegisters; | 2935 (void)ExcludeRegisters; |
| 2936 (void)Salt; |
| 2935 UnimplementedError(Func->getContext()->getFlags()); | 2937 UnimplementedError(Func->getContext()->getFlags()); |
| 2936 } | 2938 } |
| 2937 | 2939 |
| 2938 void TargetARM32::emit(const ConstantInteger32 *C) const { | 2940 void TargetARM32::emit(const ConstantInteger32 *C) const { |
| 2939 if (!BuildDefs::dump()) | 2941 if (!BuildDefs::dump()) |
| 2940 return; | 2942 return; |
| 2941 Ostream &Str = Ctx->getStrEmit(); | 2943 Ostream &Str = Ctx->getStrEmit(); |
| 2942 Str << getConstantPrefix() << C->getValue(); | 2944 Str << getConstantPrefix() << C->getValue(); |
| 2943 } | 2945 } |
| 2944 | 2946 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3037 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 3039 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 3038 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { | 3040 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { |
| 3039 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; | 3041 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; |
| 3040 } | 3042 } |
| 3041 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 3043 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 3042 // However, for compatibility with current NaCl LLVM, don't claim that. | 3044 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 3043 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 3045 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 3044 } | 3046 } |
| 3045 | 3047 |
| 3046 } // end of namespace Ice | 3048 } // end of namespace Ice |
| OLD | NEW |