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

Unified Diff: src/IceInstARM32.cpp

Issue 1670413002: Add NOP to ARM IR lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add test case. Created 4 years, 10 months 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
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 6b9c5a0ab545e4fb4f66b07bfa0f88bac954a908..025f71fb8daccd6882ba825247794c853a28b145 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1094,6 +1094,9 @@ InstARM32Vabs::InstARM32Vabs(Cfg *Func, Variable *Dest, Variable *Src,
InstARM32Dmb::InstARM32Dmb(Cfg *Func)
: InstARM32Pred(Func, InstARM32::Dmb, 0, nullptr, CondARM32::AL) {}
+InstARM32Nop::InstARM32Nop(Cfg *Func)
Jim Stichnoth 2016/02/08 18:17:50 Should nop (and dmb above) be inserted into the li
Karl 2016/02/09 21:10:01 Really? Where do you see sorting? For the most par
+ : InstARM32Pred(Func, InstARM32::Nop, 0, nullptr, CondARM32::AL) {}
+
// ======================== Dump routines ======================== //
// Two-addr ops
@@ -2298,6 +2301,27 @@ void InstARM32Dmb::dump(const Cfg *Func) const {
"sy";
}
+void InstARM32Nop::emit(const Cfg *Func) const {
+ if (!BuildDefs::dump())
+ return;
+ assert(getSrcSize() == 0);
+ Func->getContext()->getStrEmit() << "\t"
+ << "nop";
+}
+
+void InstARM32Nop::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 0);
+ Func->getAssembler<ARM32::AssemblerARM32>()->nop();
+}
+
+void InstARM32Nop::dump(const Cfg *Func) const {
+ if (!BuildDefs::dump())
+ return;
+ assert(getSrcSize() == 0);
+ Func->getContext()->getStrDump() << "\t"
Jim Stichnoth 2016/02/08 18:17:50 dump() doesn't usually prepend a tab character.
Karl 2016/02/09 21:10:01 Done.
+ << "nop";
+}
+
void OperandARM32Mem::emit(const Cfg *Func) const {
if (!BuildDefs::dump())
return;

Powered by Google App Engine
This is Rietveld 408576698