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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 addSource(Source2); | 115 addSource(Source2); |
116 } | 116 } |
117 | 117 |
118 InstX8632Label::InstX8632Label(Cfg *Func, TargetX8632 *Target) | 118 InstX8632Label::InstX8632Label(Cfg *Func, TargetX8632 *Target) |
119 : InstX8632(Func, InstX8632::Label, 0, NULL), | 119 : InstX8632(Func, InstX8632::Label, 0, NULL), |
120 Number(Target->makeNextLabelNumber()) {} | 120 Number(Target->makeNextLabelNumber()) {} |
121 | 121 |
122 IceString InstX8632Label::getName(const Cfg *Func) const { | 122 IceString InstX8632Label::getName(const Cfg *Func) const { |
123 char buf[30]; | 123 char buf[30]; |
124 snprintf(buf, llvm::array_lengthof(buf), "%u", Number); | 124 snprintf(buf, llvm::array_lengthof(buf), "%u", Number); |
125 return ".L" + Func->getFunctionName() + "$__" + buf; | 125 return ".L" + Func->getFunctionName() + "$local$__" + buf; |
126 } | 126 } |
127 | 127 |
128 InstX8632Br::InstX8632Br(Cfg *Func, CfgNode *TargetTrue, CfgNode *TargetFalse, | 128 InstX8632Br::InstX8632Br(Cfg *Func, CfgNode *TargetTrue, CfgNode *TargetFalse, |
129 InstX8632Label *Label, InstX8632::BrCond Condition) | 129 InstX8632Label *Label, InstX8632::BrCond Condition) |
130 : InstX8632(Func, InstX8632::Br, 0, NULL), Condition(Condition), | 130 : InstX8632(Func, InstX8632::Br, 0, NULL), Condition(Condition), |
131 TargetTrue(TargetTrue), TargetFalse(TargetFalse), Label(Label) {} | 131 TargetTrue(TargetTrue), TargetFalse(TargetFalse), Label(Label) {} |
132 | 132 |
133 InstX8632Call::InstX8632Call(Cfg *Func, Variable *Dest, Operand *CallTarget) | 133 InstX8632Call::InstX8632Call(Cfg *Func, Variable *Dest, Operand *CallTarget) |
134 : InstX8632(Func, InstX8632::Call, 1, Dest) { | 134 : InstX8632(Func, InstX8632::Call, 1, Dest) { |
135 HasSideEffects = true; | 135 HasSideEffects = true; |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 default: | 1467 default: |
1468 Str << "???"; | 1468 Str << "???"; |
1469 break; | 1469 break; |
1470 } | 1470 } |
1471 Str << "("; | 1471 Str << "("; |
1472 Var->dump(Func); | 1472 Var->dump(Func); |
1473 Str << ")"; | 1473 Str << ")"; |
1474 } | 1474 } |
1475 | 1475 |
1476 } // end of namespace Ice | 1476 } // end of namespace Ice |
OLD | NEW |