| OLD | NEW |
| 1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===// | 1 //===- subzero/src/IceInstMips32.cpp - Mips32 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 /// \file | 10 /// \file |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const InstMIPS32Label *Label) | 111 const InstMIPS32Label *Label) |
| 112 : InstMIPS32(Func, InstMIPS32::Br, 0, nullptr), TargetTrue(TargetTrue), | 112 : InstMIPS32(Func, InstMIPS32::Br, 0, nullptr), TargetTrue(TargetTrue), |
| 113 TargetFalse(TargetFalse), Label(Label) {} | 113 TargetFalse(TargetFalse), Label(Label) {} |
| 114 | 114 |
| 115 InstMIPS32Label::InstMIPS32Label(Cfg *Func, TargetMIPS32 *Target) | 115 InstMIPS32Label::InstMIPS32Label(Cfg *Func, TargetMIPS32 *Target) |
| 116 : InstMIPS32(Func, InstMIPS32::Label, 0, nullptr), | 116 : InstMIPS32(Func, InstMIPS32::Label, 0, nullptr), |
| 117 Number(Target->makeNextLabelNumber()) {} | 117 Number(Target->makeNextLabelNumber()) {} |
| 118 | 118 |
| 119 IceString InstMIPS32Label::getName(const Cfg *Func) const { | 119 IceString InstMIPS32Label::getName(const Cfg *Func) const { |
| 120 if (!BuildDefs::dump()) | 120 if (!BuildDefs::dump()) |
| 121 return IceString(); | 121 return ""; |
| 122 return ".L" + Func->getFunctionName() + "$local$__" + std::to_string(Number); | 122 return ".L" + Func->getFunctionName() + "$local$__" + std::to_string(Number); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void InstMIPS32Label::dump(const Cfg *Func) const { | 125 void InstMIPS32Label::dump(const Cfg *Func) const { |
| 126 if (!BuildDefs::dump()) | 126 if (!BuildDefs::dump()) |
| 127 return; | 127 return; |
| 128 Ostream &Str = Func->getContext()->getStrDump(); | 128 Ostream &Str = Func->getContext()->getStrDump(); |
| 129 Str << getName(Func) << ":"; | 129 Str << getName(Func) << ":"; |
| 130 } | 130 } |
| 131 | 131 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 445 } |
| 446 | 446 |
| 447 Str << "\t"; | 447 Str << "\t"; |
| 448 getDest()->emit(Func); | 448 getDest()->emit(Func); |
| 449 Str << ", "; | 449 Str << ", "; |
| 450 getSrc(0)->emit(Func); | 450 getSrc(0)->emit(Func); |
| 451 } | 451 } |
| 452 | 452 |
| 453 } // end of namespace MIPS32 | 453 } // end of namespace MIPS32 |
| 454 } // end of namespace Ice | 454 } // end of namespace Ice |
| OLD | NEW |