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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1431353003: Subzero: For filetype=asm, don't print a blank line for pseudo instrs. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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/IceInst.cpp ('k') | no next file » | 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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 // TODO(jpp): Improve FP register save/restore. 1081 // TODO(jpp): Improve FP register save/restore.
1082 if (!BuildDefs::dump()) 1082 if (!BuildDefs::dump())
1083 return; 1083 return;
1084 SizeT IntegerCount = 0; 1084 SizeT IntegerCount = 0;
1085 for (const Operand *Op : Dests) { 1085 for (const Operand *Op : Dests) {
1086 if (isScalarIntegerType(Op->getType())) { 1086 if (isScalarIntegerType(Op->getType())) {
1087 ++IntegerCount; 1087 ++IntegerCount;
1088 } 1088 }
1089 } 1089 }
1090 Ostream &Str = Func->getContext()->getStrEmit(); 1090 Ostream &Str = Func->getContext()->getStrEmit();
1091 bool NeedNewline = false;
1091 if (IntegerCount != 0) { 1092 if (IntegerCount != 0) {
1092 Str << "\t" 1093 Str << "\t"
1093 << "pop" 1094 << "pop"
1094 << "\t{"; 1095 << "\t{";
1095 bool PrintComma = false; 1096 bool PrintComma = false;
1096 for (const Operand *Op : Dests) { 1097 for (const Operand *Op : Dests) {
1097 if (isScalarIntegerType(Op->getType())) { 1098 if (isScalarIntegerType(Op->getType())) {
1098 if (PrintComma) 1099 if (PrintComma)
1099 Str << ", "; 1100 Str << ", ";
1100 Op->emit(Func); 1101 Op->emit(Func);
1101 PrintComma = true; 1102 PrintComma = true;
1102 } 1103 }
1103 } 1104 }
1104 Str << "}\n"; 1105 Str << "}";
1106 NeedNewline = true;
1105 } 1107 }
1106 1108
1107 for (const Operand *Op : Dests) { 1109 for (const Operand *Op : Dests) {
1108 if (isScalarIntegerType(Op->getType())) 1110 if (isScalarIntegerType(Op->getType()))
1109 continue; 1111 continue;
1110 startNextInst(Func); 1112 startNextInst(Func);
1113 if (NeedNewline) {
1114 Str << "\n";
1115 NeedNewline = false;
1116 }
1111 Str << "\t" 1117 Str << "\t"
1112 << "vpop" 1118 << "vpop"
1113 << "\t{"; 1119 << "\t{";
1114 Op->emit(Func); 1120 Op->emit(Func);
1115 Str << "}\n"; 1121 Str << "}";
1122 NeedNewline = true;
1116 } 1123 }
1124 assert(NeedNewline); // caller will add the newline
1117 } 1125 }
1118 1126
1119 void InstARM32Pop::dump(const Cfg *Func) const { 1127 void InstARM32Pop::dump(const Cfg *Func) const {
1120 if (!BuildDefs::dump()) 1128 if (!BuildDefs::dump())
1121 return; 1129 return;
1122 Ostream &Str = Func->getContext()->getStrDump(); 1130 Ostream &Str = Func->getContext()->getStrDump();
1123 Str << "pop" 1131 Str << "pop"
1124 << " "; 1132 << " ";
1125 for (SizeT I = 0; I < Dests.size(); ++I) { 1133 for (SizeT I = 0; I < Dests.size(); ++I) {
1126 if (I > 0) 1134 if (I > 0)
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>; 1710 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>;
1703 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; 1711 template class InstARM32UnaryopFP<InstARM32::Vsqrt>;
1704 1712
1705 template class InstARM32FourAddrGPR<InstARM32::Mla>; 1713 template class InstARM32FourAddrGPR<InstARM32::Mla>;
1706 template class InstARM32FourAddrGPR<InstARM32::Mls>; 1714 template class InstARM32FourAddrGPR<InstARM32::Mls>;
1707 1715
1708 template class InstARM32CmpLike<InstARM32::Cmp>; 1716 template class InstARM32CmpLike<InstARM32::Cmp>;
1709 template class InstARM32CmpLike<InstARM32::Tst>; 1717 template class InstARM32CmpLike<InstARM32::Tst>;
1710 1718
1711 } // end of namespace Ice 1719 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698