Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |