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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1441023002: Fix push/pop emit methods for ARM assembler. (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 | « no previous file | tests_lit/assembler/arm32/mul.ll » ('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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 PrintComma = true; 1110 PrintComma = true;
1111 } 1111 }
1112 } 1112 }
1113 Str << "}"; 1113 Str << "}";
1114 NeedNewline = true; 1114 NeedNewline = true;
1115 } 1115 }
1116 1116
1117 for (const Operand *Op : Dests) { 1117 for (const Operand *Op : Dests) {
1118 if (isScalarIntegerType(Op->getType())) 1118 if (isScalarIntegerType(Op->getType()))
1119 continue; 1119 continue;
1120 startNextInst(Func);
1121 if (NeedNewline) { 1120 if (NeedNewline) {
1122 Str << "\n"; 1121 Str << "\n";
1122 startNextInst(Func);
1123 NeedNewline = false; 1123 NeedNewline = false;
1124 } 1124 }
1125 Str << "\t" 1125 Str << "\t"
1126 << "vpop" 1126 << "vpop"
1127 << "\t{"; 1127 << "\t{";
1128 Op->emit(Func); 1128 Op->emit(Func);
1129 Str << "}"; 1129 Str << "}";
1130 NeedNewline = true; 1130 NeedNewline = true;
1131 } 1131 }
1132 assert(NeedNewline); // caller will add the newline 1132 assert(NeedNewline); // caller will add the newline
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 if (isScalarIntegerType(getSrc(i)->getType())) { 1220 if (isScalarIntegerType(getSrc(i)->getType())) {
1221 ++IntegerCount; 1221 ++IntegerCount;
1222 } 1222 }
1223 } 1223 }
1224 Ostream &Str = Func->getContext()->getStrEmit(); 1224 Ostream &Str = Func->getContext()->getStrEmit();
1225 bool NeedNewline = false; 1225 bool NeedNewline = false;
1226 for (SizeT i = getSrcSize(); i > 0; --i) { 1226 for (SizeT i = getSrcSize(); i > 0; --i) {
1227 Operand *Op = getSrc(i - 1); 1227 Operand *Op = getSrc(i - 1);
1228 if (isScalarIntegerType(Op->getType())) 1228 if (isScalarIntegerType(Op->getType()))
1229 continue; 1229 continue;
1230 if (NeedNewline) {
1231 Str << "\n";
1232 startNextInst(Func);
1233 NeedNewline = false;
1234 }
1230 Str << "\t" 1235 Str << "\t"
1231 << "vpush" 1236 << "vpush"
1232 << "\t{"; 1237 << "\t{";
1233 Op->emit(Func); 1238 Op->emit(Func);
1234 Str << "}"; 1239 Str << "}";
1235 NeedNewline = true; 1240 NeedNewline = true;
1236 } 1241 }
1237 if (IntegerCount != 0) { 1242 if (IntegerCount != 0) {
1238 startNextInst(Func);
1239 if (NeedNewline) { 1243 if (NeedNewline) {
1240 Str << "\n"; 1244 Str << "\n";
1245 startNextInst(Func);
1241 NeedNewline = false; 1246 NeedNewline = false;
1242 } 1247 }
1243 Str << "\t" 1248 Str << "\t"
1244 << "push" 1249 << "push"
1245 << "\t{"; 1250 << "\t{";
1246 bool PrintComma = false; 1251 bool PrintComma = false;
1247 for (SizeT i = 0; i < getSrcSize(); ++i) { 1252 for (SizeT i = 0; i < getSrcSize(); ++i) {
1248 Operand *Op = getSrc(i); 1253 Operand *Op = getSrc(i);
1249 if (isScalarIntegerType(Op->getType())) { 1254 if (isScalarIntegerType(Op->getType())) {
1250 if (PrintComma) 1255 if (PrintComma)
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>; 1767 template class InstARM32UnaryopGPR<InstARM32::Uxt, true>;
1763 template class InstARM32UnaryopFP<InstARM32::Vsqrt>; 1768 template class InstARM32UnaryopFP<InstARM32::Vsqrt>;
1764 1769
1765 template class InstARM32FourAddrGPR<InstARM32::Mla>; 1770 template class InstARM32FourAddrGPR<InstARM32::Mla>;
1766 template class InstARM32FourAddrGPR<InstARM32::Mls>; 1771 template class InstARM32FourAddrGPR<InstARM32::Mls>;
1767 1772
1768 template class InstARM32CmpLike<InstARM32::Cmp>; 1773 template class InstARM32CmpLike<InstARM32::Cmp>;
1769 template class InstARM32CmpLike<InstARM32::Tst>; 1774 template class InstARM32CmpLike<InstARM32::Tst>;
1770 1775
1771 } // end of namespace Ice 1776 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | tests_lit/assembler/arm32/mul.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698