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

Side by Side Diff: src/IceInstX8632.cpp

Issue 1185703004: Add constant blinding/pooling option for X8632 code translation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add bool flag: Randomized to OperandX8632Mem class, fix comments, rebased to master:b0a8c24ecd98f4b… Created 5 years, 6 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/IceInstX8632.cpp - X86-32 instruction implementation ---===// 1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction implementation ---===//
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 // This file implements the InstX8632 and OperandX8632 classes, 10 // This file implements the InstX8632 and OperandX8632 classes,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return TypeX8632Attributes[Ty].FldString; 84 return TypeX8632Attributes[Ty].FldString;
85 } 85 }
86 86
87 CondX86::BrCond InstX8632::getOppositeCondition(CondX86::BrCond Cond) { 87 CondX86::BrCond InstX8632::getOppositeCondition(CondX86::BrCond Cond) {
88 return InstX8632BrAttributes[Cond].Opposite; 88 return InstX8632BrAttributes[Cond].Opposite;
89 } 89 }
90 90
91 OperandX8632Mem::OperandX8632Mem(Cfg *Func, Type Ty, Variable *Base, 91 OperandX8632Mem::OperandX8632Mem(Cfg *Func, Type Ty, Variable *Base,
92 Constant *Offset, Variable *Index, 92 Constant *Offset, Variable *Index,
93 uint16_t Shift, SegmentRegisters SegmentReg) 93 uint16_t Shift, SegmentRegisters SegmentReg)
94 : OperandX8632(kMem, Ty), Base(Base), Offset(Offset), Index(Index), 94 : OperandX8632(kMem, Ty), Randomized(false), Base(Base), Offset(Offset),
qining 2015/06/19 16:23:21 add bool flag Randomized. Randomized operand shoul
95 Shift(Shift), SegmentReg(SegmentReg) { 95 Index(Index), Shift(Shift), SegmentReg(SegmentReg) {
96 assert(Shift <= 3); 96 assert(Shift <= 3);
97 Vars = nullptr; 97 Vars = nullptr;
98 NumVars = 0; 98 NumVars = 0;
99 if (Base) 99 if (Base)
100 ++NumVars; 100 ++NumVars;
101 if (Index) 101 if (Index)
102 ++NumVars; 102 ++NumVars;
103 if (NumVars) { 103 if (NumVars) {
104 Vars = Func->allocateArrayOf<Variable *>(NumVars); 104 Vars = Func->allocateArrayOf<Variable *>(NumVars);
105 SizeT I = 0; 105 SizeT I = 0;
(...skipping 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 } 3053 }
3054 Str << "("; 3054 Str << "(";
3055 if (Func) 3055 if (Func)
3056 Var->dump(Func); 3056 Var->dump(Func);
3057 else 3057 else
3058 Var->dump(Str); 3058 Var->dump(Str);
3059 Str << ")"; 3059 Str << ")";
3060 } 3060 }
3061 3061
3062 } // end of namespace Ice 3062 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698