diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-04-18 09:44:45 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-04-18 09:44:45 -0400 |
commit | cae6b571d63b38c3177f5b47891021ba69386453 (patch) | |
tree | 6039a7ce3381b6c5448fc127bdb7b063ae52115e /arch/sparc/isa/formats | |
parent | 0534e355b77497a1272f6078edae1692d87a15cf (diff) | |
parent | 609c4ecea618c6406e50432e38882925db7b7ede (diff) | |
download | gem5-cae6b571d63b38c3177f5b47891021ba69386453.tar.xz |
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem
--HG--
extra : convert_revision : 3eb97976caf57e43119a998c31128ca6f163c05b
Diffstat (limited to 'arch/sparc/isa/formats')
-rw-r--r-- | arch/sparc/isa/formats/branch.isa | 5 | ||||
-rw-r--r-- | arch/sparc/isa/formats/integerop.isa | 2 | ||||
-rw-r--r-- | arch/sparc/isa/formats/mem.isa | 12 | ||||
-rw-r--r-- | arch/sparc/isa/formats/trap.isa | 14 |
4 files changed, 22 insertions, 11 deletions
diff --git a/arch/sparc/isa/formats/branch.isa b/arch/sparc/isa/formats/branch.isa index e4ce4592c..b76f7a9f6 100644 --- a/arch/sparc/isa/formats/branch.isa +++ b/arch/sparc/isa/formats/branch.isa @@ -230,14 +230,13 @@ def template BranchExecute {{ def format Branch(code, *opt_flags) {{ (usesImm, code, immCode, rString, iString) = splitOutImm(code) - codeBlk = CodeBlock(code) - iop = InstObjParams(name, Name, 'Branch', codeBlk, opt_flags) + iop = InstObjParams(name, Name, 'Branch', code, opt_flags) header_output = BasicDeclare.subst(iop) decoder_output = BasicConstructor.subst(iop) exec_output = BranchExecute.subst(iop) if usesImm: imm_iop = InstObjParams(name, Name + 'Imm', 'BranchImm' + iString, - codeBlk, opt_flags) + immCode, opt_flags) header_output += BasicDeclare.subst(imm_iop) decoder_output += BasicConstructor.subst(imm_iop) exec_output += BranchExecute.subst(imm_iop) diff --git a/arch/sparc/isa/formats/integerop.isa b/arch/sparc/isa/formats/integerop.isa index f14f9e858..401af2e51 100644 --- a/arch/sparc/isa/formats/integerop.isa +++ b/arch/sparc/isa/formats/integerop.isa @@ -243,8 +243,8 @@ def template IntOpExecute {{ //Write the resulting state to the execution context if(fault == NoFault) { - %(op_wb)s; %(cc_code)s; + %(op_wb)s; } return fault; } diff --git a/arch/sparc/isa/formats/mem.isa b/arch/sparc/isa/formats/mem.isa index db2a4aaaa..e15349c7b 100644 --- a/arch/sparc/isa/formats/mem.isa +++ b/arch/sparc/isa/formats/mem.isa @@ -47,17 +47,18 @@ output decoder {{ { std::stringstream response; bool load = flags[IsLoad]; + bool save = flags[IsStore]; printMnemonic(response, mnemonic); - if(!load) + if(save) { printReg(response, _srcRegIdx[0]); ccprintf(response, ", "); } ccprintf(response, "[ "); - printReg(response, _srcRegIdx[load ? 0 : 1]); + printReg(response, _srcRegIdx[!save ? 0 : 1]); ccprintf(response, " + "); - printReg(response, _srcRegIdx[load ? 1 : 2]); + printReg(response, _srcRegIdx[!save ? 1 : 2]); ccprintf(response, " ]"); if(load) { @@ -73,15 +74,16 @@ output decoder {{ { std::stringstream response; bool load = flags[IsLoad]; + bool save = flags[IsStore]; printMnemonic(response, mnemonic); - if(!load) + if(save) { printReg(response, _srcRegIdx[0]); ccprintf(response, ", "); } ccprintf(response, "[ "); - printReg(response, _srcRegIdx[load ? 0 : 1]); + printReg(response, _srcRegIdx[!save ? 0 : 1]); ccprintf(response, " + 0x%x ]", imm); if(load) { diff --git a/arch/sparc/isa/formats/trap.isa b/arch/sparc/isa/formats/trap.isa index 5608548bd..f6a45ca48 100644 --- a/arch/sparc/isa/formats/trap.isa +++ b/arch/sparc/isa/formats/trap.isa @@ -14,12 +14,14 @@ output header {{ // Constructor Trap(const char *mnem, ExtMachInst _machInst, OpClass __opClass) : - SparcStaticInst(mnem, _machInst, __opClass) + SparcStaticInst(mnem, _machInst, __opClass), trapNum(SW_TRAP) { } std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; + + int trapNum; }; }}; @@ -27,7 +29,15 @@ output decoder {{ std::string Trap::generateDisassembly(Addr pc, const SymbolTable *symtab) const { - return "Trap instruction"; + std::stringstream response; + + printMnemonic(response, mnemonic); + ccprintf(response, " "); + printReg(response, _srcRegIdx[0]); + ccprintf(response, ", 0x%x", trapNum); + ccprintf(response, ", or "); + printReg(response, _srcRegIdx[1]); + return response.str(); } }}; |