| OLD | NEW |
| 1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// | 1 //===- subzero/src/IceInstARM32.cpp - ARM32 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 883 |
| 884 template <> void InstARM32Movw::emit(const Cfg *Func) const { | 884 template <> void InstARM32Movw::emit(const Cfg *Func) const { |
| 885 if (!BuildDefs::dump()) | 885 if (!BuildDefs::dump()) |
| 886 return; | 886 return; |
| 887 Ostream &Str = Func->getContext()->getStrEmit(); | 887 Ostream &Str = Func->getContext()->getStrEmit(); |
| 888 assert(getSrcSize() == 1); | 888 assert(getSrcSize() == 1); |
| 889 Str << "\t" << Opcode << getPredicate() << "\t"; | 889 Str << "\t" << Opcode << getPredicate() << "\t"; |
| 890 getDest()->emit(Func); | 890 getDest()->emit(Func); |
| 891 Str << ", "; | 891 Str << ", "; |
| 892 Constant *Src0 = llvm::cast<Constant>(getSrc(0)); | 892 Constant *Src0 = llvm::cast<Constant>(getSrc(0)); |
| 893 if (auto CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { | 893 if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { |
| 894 Str << "#:lower16:"; | 894 Str << "#:lower16:"; |
| 895 CR->emitWithoutPrefix(Func->getTarget()); | 895 CR->emitWithoutPrefix(Func->getTarget()); |
| 896 } else { | 896 } else { |
| 897 Src0->emit(Func); | 897 Src0->emit(Func); |
| 898 } | 898 } |
| 899 } | 899 } |
| 900 | 900 |
| 901 template <> void InstARM32Movt::emit(const Cfg *Func) const { | 901 template <> void InstARM32Movt::emit(const Cfg *Func) const { |
| 902 if (!BuildDefs::dump()) | 902 if (!BuildDefs::dump()) |
| 903 return; | 903 return; |
| 904 Ostream &Str = Func->getContext()->getStrEmit(); | 904 Ostream &Str = Func->getContext()->getStrEmit(); |
| 905 assert(getSrcSize() == 2); | 905 assert(getSrcSize() == 2); |
| 906 Variable *Dest = getDest(); | 906 Variable *Dest = getDest(); |
| 907 Constant *Src1 = llvm::cast<Constant>(getSrc(1)); | 907 Constant *Src1 = llvm::cast<Constant>(getSrc(1)); |
| 908 Str << "\t" << Opcode << getPredicate() << "\t"; | 908 Str << "\t" << Opcode << getPredicate() << "\t"; |
| 909 Dest->emit(Func); | 909 Dest->emit(Func); |
| 910 Str << ", "; | 910 Str << ", "; |
| 911 if (auto CR = llvm::dyn_cast<ConstantRelocatable>(Src1)) { | 911 if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src1)) { |
| 912 Str << "#:upper16:"; | 912 Str << "#:upper16:"; |
| 913 CR->emitWithoutPrefix(Func->getTarget()); | 913 CR->emitWithoutPrefix(Func->getTarget()); |
| 914 } else { | 914 } else { |
| 915 Src1->emit(Func); | 915 Src1->emit(Func); |
| 916 } | 916 } |
| 917 } | 917 } |
| 918 | 918 |
| 919 void InstARM32Pop::emit(const Cfg *Func) const { | 919 void InstARM32Pop::emit(const Cfg *Func) const { |
| 920 // TODO(jpp): Improve FP register save/restore. | 920 // TODO(jpp): Improve FP register save/restore. |
| 921 if (!BuildDefs::dump()) | 921 if (!BuildDefs::dump()) |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 template class InstARM32ThreeAddrGPR<InstARM32::Udiv>; | 1448 template class InstARM32ThreeAddrGPR<InstARM32::Udiv>; |
| 1449 | 1449 |
| 1450 template class InstARM32ThreeAddrFP<InstARM32::Vadd>; | 1450 template class InstARM32ThreeAddrFP<InstARM32::Vadd>; |
| 1451 template class InstARM32ThreeAddrFP<InstARM32::Vdiv>; | 1451 template class InstARM32ThreeAddrFP<InstARM32::Vdiv>; |
| 1452 template class InstARM32ThreeAddrFP<InstARM32::Vmul>; | 1452 template class InstARM32ThreeAddrFP<InstARM32::Vmul>; |
| 1453 template class InstARM32ThreeAddrFP<InstARM32::Vsub>; | 1453 template class InstARM32ThreeAddrFP<InstARM32::Vsub>; |
| 1454 | 1454 |
| 1455 template class InstARM32TwoAddrGPR<InstARM32::Movt>; | 1455 template class InstARM32TwoAddrGPR<InstARM32::Movt>; |
| 1456 | 1456 |
| 1457 } // end of namespace Ice | 1457 } // end of namespace Ice |
| OLD | NEW |