Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: src/IceTargetLoweringARM32.cpp

Issue 1300993002: Use separate random number generator for each randomization pass (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Assign default value of ConstantBlindingCookie in its declaration Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
3037 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; 3038 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n";
3038 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { 3039 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) {
3039 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; 3040 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n";
3040 } 3041 }
3041 // Technically R9 is used for TLS with Sandboxing, and we reserve it. 3042 // Technically R9 is used for TLS with Sandboxing, and we reserve it.
3042 // However, for compatibility with current NaCl LLVM, don't claim that. 3043 // 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"; 3044 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n";
3044 } 3045 }
3045 3046
3046 } // end of namespace Ice 3047 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698