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

Unified Diff: src/IceInstARM32.cpp

Issue 1439683002: Fix line spacing for push instructions in ARM assembly. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Merge with master. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests_lit/assembler/arm32/bic.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 2ca099b1689dfb93c5748a01c51aa911d77b10e9..b98550929db9a57d0533943a1d8da72c2ecd32b0 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1214,6 +1214,7 @@ void InstARM32Push::emit(const Cfg *Func) const {
}
}
Ostream &Str = Func->getContext()->getStrEmit();
+ bool NeedNewline = false;
for (SizeT i = getSrcSize(); i > 0; --i) {
Operand *Op = getSrc(i - 1);
if (isScalarIntegerType(Op->getType()))
@@ -1222,10 +1223,15 @@ void InstARM32Push::emit(const Cfg *Func) const {
<< "vpush"
<< "\t{";
Op->emit(Func);
- Str << "}\n";
+ Str << "}";
+ NeedNewline = true;
}
if (IntegerCount != 0) {
startNextInst(Func);
+ if (NeedNewline) {
+ Str << "\n";
+ NeedNewline = false;
+ }
Str << "\t"
<< "push"
<< "\t{";
@@ -1239,8 +1245,10 @@ void InstARM32Push::emit(const Cfg *Func) const {
PrintComma = true;
}
}
- Str << "}\n";
+ Str << "}";
+ NeedNewline = true;
}
+ assert(NeedNewline); // caller will add the newline
}
void InstARM32Push::emitIAS(const Cfg *Func) const {
« no previous file with comments | « no previous file | tests_lit/assembler/arm32/bic.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698