Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: src/IceInstARM32.cpp

Issue 1472623002: Unify alloca, outgoing arg, and prolog construction (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review fixes. Also removed StackAdjustment. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698