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

Unified Diff: src/IceAssemblerARM32.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/IceAssemblerARM32.h
diff --git a/src/IceAssemblerARM32.h b/src/IceAssemblerARM32.h
index 46478b63957346769942f50146a5e0b734528523..8003ef783c75bcc13c068d78602ec12e1b279823 100644
--- a/src/IceAssemblerARM32.h
+++ b/src/IceAssemblerARM32.h
@@ -255,15 +255,19 @@ public:
void orr(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1,
bool SetFlags, CondARM32::Cond Cond);
- void pop(const Operand *OpRt, CondARM32::Cond Cond);
+ template <AssemblyOutputForm>
John 2016/01/04 15:27:49 The idea of the assembler emitting textual output
Karl 2016/01/05 17:43:03 Refactored so that textual generation is only in I
+ void pop(const Cfg *Cfg, const Operand *OpRt, CondARM32::Cond Cond);
// Note: Registers is a bitset, where bit n corresponds to register Rn.
- void popList(const IValueT Registers, CondARM32::Cond Cond);
+ template <AssemblyOutputForm>
+ void popList(const Cfg *Cfg, const IValueT Registers, CondARM32::Cond Cond);
- void push(const Operand *OpRt, CondARM32::Cond Cond);
+ template <AssemblyOutputForm>
+ void push(const Cfg *Func, const Operand *OpRt, CondARM32::Cond Cond);
// Note: Registers is a bitset, where bit n corresponds to register Rn.
- void pushList(const IValueT Registers, CondARM32::Cond Cond);
+ template <AssemblyOutputForm>
+ void pushList(const Cfg *Func, const IValueT Registers, CondARM32::Cond Cond);
void rbit(const Operand *OpRd, const Operand *OpRm, CondARM32::Cond Cond);
@@ -318,10 +322,12 @@ public:
// Implements uxtb/uxth depending on type of OpSrc0.
void uxt(const Operand *OpRd, const Operand *OpSrc0, CondARM32::Cond Cond);
- void vpop(const Variable *OpBaseReg, SizeT NumConsecRegs,
+ template <AssemblyOutputForm Form>
+ void vpop(const Cfg *Func, const Variable *OpBaseReg, SizeT NumConsecRegs,
CondARM32::Cond Cond);
- void vpush(const Variable *OpBaseReg, SizeT NumConsecRegs,
+ template <AssemblyOutputForm Form>
+ void vpush(const Cfg *Func, const Variable *OpBaseReg, SizeT NumConsecRegs,
CondARM32::Cond Cond);
static bool classof(const Assembler *Asm) {
@@ -422,10 +428,17 @@ private:
// Pattern ccccxxxxxDxxxxxxddddxxxxiiiiiiii where cccc=Cond, ddddD=BaseReg,
// iiiiiiii=NumConsecRegs, and xxxxx0xxxxxx0000xxxx00000000=Opcode.
- void emitVStackOp(CondARM32::Cond Cond, IValueT Opcode,
+ template <AssemblyOutputForm Form>
+ void emitVStackOp(const Cfg *Func, CondARM32::Cond Cond, IValueT Opcode,
const Variable *OpBaseReg, SizeT NumConsecRegs,
const char *InstName);
+ void emitStackTextOp(const Cfg *Func, const IValueT Registers,
+ CondARM32::Cond Cond, const char *InstName);
+
+ void emitStackTextOp(const Cfg *Func, const Operand *OpRt,
+ CondARM32::Cond Cond, const char *InstName);
+
// Pattern cccc011100x1dddd1111mmmm0001nnn where cccc=Cond,
// x=Opcode, dddd=Rd, nnnn=Rn, mmmm=Rm.
void emitDivOp(CondARM32::Cond Cond, IValueT Opcode, IValueT Rd, IValueT Rn,
« src/IceAssembler.h ('K') | « src/IceAssembler.h ('k') | src/IceAssemblerARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698