summaryrefslogtreecommitdiff
path: root/src/arch/sparc/isa/base.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-07-19 02:07:00 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-07-19 02:07:00 -0400
commitb7b603f9a7c6fa66691201b3c311e29db82fd372 (patch)
tree837c9be21059b14a80304e1aa4a36a6f4f8652e5 /src/arch/sparc/isa/base.isa
parent44974a4462e019cfc5c65d20ad620faa9bc7f8cf (diff)
downloadgem5-b7b603f9a7c6fa66691201b3c311e29db82fd372.tar.xz
Cleaned things up a little.
--HG-- extra : convert_revision : 7091b0d02e5b7c80be43b5ab1ac003dc89c4c136
Diffstat (limited to 'src/arch/sparc/isa/base.isa')
-rw-r--r--src/arch/sparc/isa/base.isa36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/arch/sparc/isa/base.isa b/src/arch/sparc/isa/base.isa
index 02f7cf61a..f9c750901 100644
--- a/src/arch/sparc/isa/base.isa
+++ b/src/arch/sparc/isa/base.isa
@@ -85,7 +85,12 @@ output header {{
std::string generateDisassembly(Addr pc,
const SymbolTable *symtab) const;
- void printReg(std::ostream &os, int reg) const;
+ void printReg(std::ostream &os, RegIndex reg) const;
+ void printSrcReg(std::ostream &os, int reg) const;
+ void printDestReg(std::ostream &os, int reg) const;
+
+ void printRegArray(std::ostream &os,
+ const RegIndex indexArray[], int num) const;
};
bool passesCondition(uint32_t codes, uint32_t condition);
@@ -150,8 +155,35 @@ output decoder {{
ccprintf(os, "\t%s ", mnemonic);
}
+ void SparcStaticInst::printRegArray(std::ostream &os,
+ const RegIndex indexArray[], int num) const
+ {
+ if(num <= 0)
+ return;
+ printReg(os, indexArray[0]);
+ for(int x = 1; x < num; x++)
+ {
+ os << ", ";
+ printReg(os, indexArray[x]);
+ }
+ }
+
+ void
+ SparcStaticInst::printSrcReg(std::ostream &os, int reg) const
+ {
+ if(_numSrcRegs > reg)
+ printReg(os, _srcRegIdx[reg]);
+ }
+
+ void
+ SparcStaticInst::printDestReg(std::ostream &os, int reg) const
+ {
+ if(_numDestRegs > reg)
+ printReg(os, _destRegIdx[reg]);
+ }
+
void
- SparcStaticInst::printReg(std::ostream &os, int reg) const
+ SparcStaticInst::printReg(std::ostream &os, RegIndex reg) const
{
const int MaxGlobal = 8;
const int MaxOutput = 16;