| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 Str << "[MIPS32] "; | 274 Str << "[MIPS32] "; |
| 275 Inst::dump(Func); | 275 Inst::dump(Func); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void OperandMIPS32Mem::emit(const Cfg *Func) const { | 278 void OperandMIPS32Mem::emit(const Cfg *Func) const { |
| 279 if (!BuildDefs::dump()) | 279 if (!BuildDefs::dump()) |
| 280 return; | 280 return; |
| 281 Ostream &Str = Func->getContext()->getStrEmit(); | 281 Ostream &Str = Func->getContext()->getStrEmit(); |
| 282 Operand *Offset = getOffset(); | 282 Operand *Offset = getOffset(); |
| 283 if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) { | 283 if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) { |
| 284 Str << "("; |
| 284 CR->emitWithoutPrefix(Func->getTarget()); | 285 CR->emitWithoutPrefix(Func->getTarget()); |
| 286 Str << ")"; |
| 285 } else | 287 } else |
| 286 Offset->emit(Func); | 288 Offset->emit(Func); |
| 287 Str << "("; | 289 Str << "("; |
| 288 getBase()->emit(Func); | 290 getBase()->emit(Func); |
| 289 Str << ")"; | 291 Str << ")"; |
| 290 } | 292 } |
| 291 | 293 |
| 292 void InstMIPS32::emitUnaryopGPR(const char *Opcode, const InstMIPS32 *Inst, | 294 void InstMIPS32::emitUnaryopGPR(const char *Opcode, const InstMIPS32 *Inst, |
| 293 const Cfg *Func) { | 295 const Cfg *Func) { |
| 294 if (!BuildDefs::dump()) | 296 if (!BuildDefs::dump()) |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 getSrc(0)->emit(Func); | 675 getSrc(0)->emit(Func); |
| 674 return; | 676 return; |
| 675 } | 677 } |
| 676 | 678 |
| 677 // stack to stack | 679 // stack to stack |
| 678 llvm::report_fatal_error("mov cant copy stack to stack."); | 680 llvm::report_fatal_error("mov cant copy stack to stack."); |
| 679 } | 681 } |
| 680 | 682 |
| 681 } // end of namespace MIPS32 | 683 } // end of namespace MIPS32 |
| 682 } // end of namespace Ice | 684 } // end of namespace Ice |
| OLD | NEW |