| 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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 Str << "\t" | 968 Str << "\t" |
| 969 << "bl" | 969 << "bl" |
| 970 << "\t"; | 970 << "\t"; |
| 971 CallTarget->emitWithoutPrefix(Func->getTarget()); | 971 CallTarget->emitWithoutPrefix(Func->getTarget()); |
| 972 } else { | 972 } else { |
| 973 Str << "\t" | 973 Str << "\t" |
| 974 << "blx" | 974 << "blx" |
| 975 << "\t"; | 975 << "\t"; |
| 976 getCallTarget()->emit(Func); | 976 getCallTarget()->emit(Func); |
| 977 } | 977 } |
| 978 Func->getTarget()->resetStackAdjustment(); | |
| 979 } | 978 } |
| 980 | 979 |
| 981 void InstARM32Call::emitIAS(const Cfg *Func) const { | 980 void InstARM32Call::emitIAS(const Cfg *Func) const { |
| 982 assert(getSrcSize() == 1); | 981 assert(getSrcSize() == 1); |
| 983 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 982 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 984 if (llvm::isa<ConstantInteger32>(getCallTarget())) { | 983 if (llvm::isa<ConstantInteger32>(getCallTarget())) { |
| 985 // This shouldn't happen (typically have to copy the full 32-bits to a | 984 // This shouldn't happen (typically have to copy the full 32-bits to a |
| 986 // register and do an indirect jump). | 985 // register and do an indirect jump). |
| 987 llvm::report_fatal_error("ARM32Call to ConstantInteger32"); | 986 llvm::report_fatal_error("ARM32Call to ConstantInteger32"); |
| 988 } else if (const auto *CallTarget = | 987 } else if (const auto *CallTarget = |
| 989 llvm::dyn_cast<ConstantRelocatable>(getCallTarget())) { | 988 llvm::dyn_cast<ConstantRelocatable>(getCallTarget())) { |
| 990 // Calls only have 24-bits, but the linker should insert veneers to extend | 989 // Calls only have 24-bits, but the linker should insert veneers to extend |
| 991 // the range if needed. | 990 // the range if needed. |
| 992 Asm->bl(CallTarget); | 991 Asm->bl(CallTarget); |
| 993 } else { | 992 } else { |
| 994 Asm->blx(getCallTarget()); | 993 Asm->blx(getCallTarget()); |
| 995 } | 994 } |
| 996 if (Asm->needsTextFixup()) | 995 if (Asm->needsTextFixup()) |
| 997 return emitUsingTextFixup(Func); | 996 return emitUsingTextFixup(Func); |
| 998 Func->getTarget()->resetStackAdjustment(); | |
| 999 } | 997 } |
| 1000 | 998 |
| 1001 void InstARM32Call::dump(const Cfg *Func) const { | 999 void InstARM32Call::dump(const Cfg *Func) const { |
| 1002 if (!BuildDefs::dump()) | 1000 if (!BuildDefs::dump()) |
| 1003 return; | 1001 return; |
| 1004 Ostream &Str = Func->getContext()->getStrDump(); | 1002 Ostream &Str = Func->getContext()->getStrDump(); |
| 1005 if (getDest()) { | 1003 if (getDest()) { |
| 1006 dumpDest(Func); | 1004 dumpDest(Func); |
| 1007 Str << " = "; | 1005 Str << " = "; |
| 1008 } | 1006 } |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; | 1897 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; |
| 1900 | 1898 |
| 1901 template class InstARM32FourAddrGPR<InstARM32::Mla>; | 1899 template class InstARM32FourAddrGPR<InstARM32::Mla>; |
| 1902 template class InstARM32FourAddrGPR<InstARM32::Mls>; | 1900 template class InstARM32FourAddrGPR<InstARM32::Mls>; |
| 1903 | 1901 |
| 1904 template class InstARM32CmpLike<InstARM32::Cmn>; | 1902 template class InstARM32CmpLike<InstARM32::Cmn>; |
| 1905 template class InstARM32CmpLike<InstARM32::Cmp>; | 1903 template class InstARM32CmpLike<InstARM32::Cmp>; |
| 1906 template class InstARM32CmpLike<InstARM32::Tst>; | 1904 template class InstARM32CmpLike<InstARM32::Tst>; |
| 1907 | 1905 |
| 1908 } // end of namespace Ice | 1906 } // end of namespace Ice |
| OLD | NEW |