diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-07-20 19:04:09 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-07-20 19:04:09 -0400 |
commit | 419acd31cb6d1d177ff086dd140cd25521f6100e (patch) | |
tree | 92f13a0469c7e3037af0dfca638b4d3824ecfd7f /src/arch/sparc/isa/base.isa | |
parent | 0850c3dedbedaaa269ff2e28680b91ae3767b163 (diff) | |
parent | b7b603f9a7c6fa66691201b3c311e29db82fd372 (diff) | |
download | gem5-419acd31cb6d1d177ff086dd140cd25521f6100e.tar.xz |
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem
--HG--
extra : convert_revision : 0c696374b19b27c0bd50ffa7f75117b1e211e4bc
Diffstat (limited to 'src/arch/sparc/isa/base.isa')
-rw-r--r-- | src/arch/sparc/isa/base.isa | 36 |
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; |