| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 if (getTargetTrue() == NextNode) { | 177 if (getTargetTrue() == NextNode) { |
| 178 assert(Condition != CondX86::Br_None); | 178 assert(Condition != CondX86::Br_None); |
| 179 Condition = InstX8632BrAttributes[Condition].Opposite; | 179 Condition = InstX8632BrAttributes[Condition].Opposite; |
| 180 TargetTrue = getTargetFalse(); | 180 TargetTrue = getTargetFalse(); |
| 181 TargetFalse = NULL; | 181 TargetFalse = NULL; |
| 182 return true; | 182 return true; |
| 183 } | 183 } |
| 184 return false; | 184 return false; |
| 185 } | 185 } |
| 186 | 186 |
| 187 bool InstX8632Br::repointEdge(CfgNode *OldNode, CfgNode *NewNode) { |
| 188 if (TargetFalse == OldNode) { |
| 189 TargetFalse = NewNode; |
| 190 return true; |
| 191 } else if (TargetTrue == OldNode) { |
| 192 TargetTrue = NewNode; |
| 193 return true; |
| 194 } |
| 195 return false; |
| 196 } |
| 197 |
| 187 InstX8632Call::InstX8632Call(Cfg *Func, Variable *Dest, Operand *CallTarget) | 198 InstX8632Call::InstX8632Call(Cfg *Func, Variable *Dest, Operand *CallTarget) |
| 188 : InstX8632(Func, InstX8632::Call, 1, Dest) { | 199 : InstX8632(Func, InstX8632::Call, 1, Dest) { |
| 189 HasSideEffects = true; | 200 HasSideEffects = true; |
| 190 addSource(CallTarget); | 201 addSource(CallTarget); |
| 191 } | 202 } |
| 192 | 203 |
| 193 InstX8632Cmov::InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, | 204 InstX8632Cmov::InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, |
| 194 CondX86::BrCond Condition) | 205 CondX86::BrCond Condition) |
| 195 : InstX8632(Func, InstX8632::Cmov, 2, Dest), Condition(Condition) { | 206 : InstX8632(Func, InstX8632::Cmov, 2, Dest), Condition(Condition) { |
| 196 // The final result is either the original Dest, or Source, so mark | 207 // The final result is either the original Dest, or Source, so mark |
| (...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2951 } | 2962 } |
| 2952 Str << "("; | 2963 Str << "("; |
| 2953 if (Func) | 2964 if (Func) |
| 2954 Var->dump(Func); | 2965 Var->dump(Func); |
| 2955 else | 2966 else |
| 2956 Var->dump(Str); | 2967 Var->dump(Str); |
| 2957 Str << ")"; | 2968 Str << ")"; |
| 2958 } | 2969 } |
| 2959 | 2970 |
| 2960 } // end of namespace Ice | 2971 } // end of namespace Ice |
| OLD | NEW |