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

Unified Diff: src/IceInstARM32.h

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
« no previous file with comments | « no previous file | src/IceInstARM32.cpp » ('j') | src/IceInstARM32.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.h
diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h
index bce1aca787ddd3b6484855fc2e2be4a6a82ad9ad..62af449c7168814e4fb5f7720c65fb7629c3869d 100644
--- a/src/IceInstARM32.h
+++ b/src/IceInstARM32.h
@@ -394,6 +394,7 @@ public:
Ldrex,
Lsl,
Lsr,
+ Nop,
Mla,
Mls,
Mov,
@@ -1434,6 +1435,24 @@ private:
explicit InstARM32Dmb(Cfg *Func);
};
+class InstARM32Nop final : public InstARM32Pred {
Eric Holk 2016/02/08 17:29:43 Does it make sense to have Nop derive from a predi
Karl 2016/02/08 17:55:55 The ARM instruction allows predicates, and so like
Eric Holk 2016/02/08 17:58:15 That seems reasonable.
+ InstARM32Nop() = delete;
+ InstARM32Nop(const InstARM32Nop &) = delete;
+ InstARM32Nop &operator=(const InstARM32Nop &) = delete;
+
+public:
+ static InstARM32Nop *create(Cfg *Func) {
+ return new (Func->allocate<InstARM32Nop>()) InstARM32Nop(Func);
+ }
+ void emit(const Cfg *Func) const override;
+ void emitIAS(const Cfg *Func) const override;
+ void dump(const Cfg *Func) const override;
+ static bool classof(const Inst *Instr) { return isClassof(Instr, Nop); }
+
+private:
+ explicit InstARM32Nop(Cfg *Func);
+};
+
// Declare partial template specializations of emit() methods that already have
// default implementations. Without this, there is the possibility of ODR
// violations and link errors.
« no previous file with comments | « no previous file | src/IceInstARM32.cpp » ('j') | src/IceInstARM32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698