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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 template <InstARM32::InstKindARM32 K> | 1177 template <InstARM32::InstKindARM32 K> |
1178 void InstARM32TwoAddrGPR<K>::emitIAS(const Cfg *Func) const { | 1178 void InstARM32TwoAddrGPR<K>::emitIAS(const Cfg *Func) const { |
1179 emitUsingTextFixup(Func); | 1179 emitUsingTextFixup(Func); |
1180 } | 1180 } |
1181 | 1181 |
1182 template <InstARM32::InstKindARM32 K, bool Nws> | 1182 template <InstARM32::InstKindARM32 K, bool Nws> |
1183 void InstARM32UnaryopGPR<K, Nws>::emitIAS(const Cfg *Func) const { | 1183 void InstARM32UnaryopGPR<K, Nws>::emitIAS(const Cfg *Func) const { |
1184 emitUsingTextFixup(Func); | 1184 emitUsingTextFixup(Func); |
1185 } | 1185 } |
1186 | 1186 |
| 1187 template <> void InstARM32Rev::emitIAS(const Cfg *Func) const { |
| 1188 assert(getSrcSize() == 1); |
| 1189 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 1190 Asm->rev(getDest(), getSrc(0), getPredicate()); |
| 1191 if (Asm->needsTextFixup()) |
| 1192 emitUsingTextFixup(Func); |
| 1193 } |
| 1194 |
1187 template <> void InstARM32Movw::emit(const Cfg *Func) const { | 1195 template <> void InstARM32Movw::emit(const Cfg *Func) const { |
1188 if (!BuildDefs::dump()) | 1196 if (!BuildDefs::dump()) |
1189 return; | 1197 return; |
1190 Ostream &Str = Func->getContext()->getStrEmit(); | 1198 Ostream &Str = Func->getContext()->getStrEmit(); |
1191 assert(getSrcSize() == 1); | 1199 assert(getSrcSize() == 1); |
1192 Str << "\t" << Opcode << getPredicate() << "\t"; | 1200 Str << "\t" << Opcode << getPredicate() << "\t"; |
1193 getDest()->emit(Func); | 1201 getDest()->emit(Func); |
1194 Str << ", "; | 1202 Str << ", "; |
1195 Constant *Src0 = llvm::cast<Constant>(getSrc(0)); | 1203 Constant *Src0 = llvm::cast<Constant>(getSrc(0)); |
1196 if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { | 1204 if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2020 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; | 2028 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; |
2021 | 2029 |
2022 template class InstARM32FourAddrGPR<InstARM32::Mla>; | 2030 template class InstARM32FourAddrGPR<InstARM32::Mla>; |
2023 template class InstARM32FourAddrGPR<InstARM32::Mls>; | 2031 template class InstARM32FourAddrGPR<InstARM32::Mls>; |
2024 | 2032 |
2025 template class InstARM32CmpLike<InstARM32::Cmn>; | 2033 template class InstARM32CmpLike<InstARM32::Cmn>; |
2026 template class InstARM32CmpLike<InstARM32::Cmp>; | 2034 template class InstARM32CmpLike<InstARM32::Cmp>; |
2027 template class InstARM32CmpLike<InstARM32::Tst>; | 2035 template class InstARM32CmpLike<InstARM32::Tst>; |
2028 | 2036 |
2029 } // end of namespace Ice | 2037 } // end of namespace Ice |
OLD | NEW |