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

Unified Diff: src/IceInstARM32.h

Issue 1535233002: Refactor PUSH/POP in ARM assemblers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove "#if 0' Created 5 years 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.h
diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h
index a2aba571a8497fe81f2bed87eadead279039af18..13eb5c60a34afcf35057a73c1efec2881f8de8d2 100644
--- a/src/IceInstARM32.h
+++ b/src/IceInstARM32.h
@@ -428,6 +428,8 @@ public:
static const char *getVecWidthString(Type Ty);
static CondARM32::Cond getOppositeCondition(CondARM32::Cond Cond);
+ template <AssemblyOutputForm> void startNextAsmInst(const Cfg *Func) const;
+
/// Called inside derived methods emit() to communicate that multiple
/// instructions are being generated. Used by emitIAS() methods to
/// generate textual fixups for instructions that are not yet
@@ -1065,8 +1067,11 @@ public:
static InstARM32Pop *create(Cfg *Func, const VarList &Dests) {
return new (Func->allocate<InstARM32Pop>()) InstARM32Pop(Func, Dests);
}
- void emit(const Cfg *Func) const override;
- void emitIAS(const Cfg *Func) const override;
+ void emit(const Cfg *Func) const override { assemble<TextualAssembly>(Func); }
+ void emitIAS(const Cfg *Func) const override {
+ assemble<BinaryAssembly>(Func);
+ }
+ template <AssemblyOutputForm> void assemble(const Cfg *Func) const;
void dump(const Cfg *Func) const override;
static bool classof(const Inst *Inst) { return isClassof(Inst, Pop); }
@@ -1087,8 +1092,11 @@ public:
static InstARM32Push *create(Cfg *Func, const VarList &Srcs) {
return new (Func->allocate<InstARM32Push>()) InstARM32Push(Func, Srcs);
}
- void emit(const Cfg *Func) const override;
- void emitIAS(const Cfg *Func) const override;
+ void emit(const Cfg *Func) const override { assemble<TextualAssembly>(Func); }
+ void emitIAS(const Cfg *Func) const override {
+ assemble<BinaryAssembly>(Func);
+ }
+ template <AssemblyOutputForm> void assemble(const Cfg *Func) const;
void dump(const Cfg *Func) const override;
static bool classof(const Inst *Inst) { return isClassof(Inst, Push); }
« src/IceAssemblerARM32.h ('K') | « src/IceAssemblerARM32.cpp ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698