From: Gabe Black Date: Wed, 18 Jul 2007 23:09:35 +0000 (-0700) Subject: Add a generateDisassembly function to the MicroFault StaticInst. X-Git-Tag: m5_2.0_beta4~297^2~42 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dffc40ff62e6901084efdef6806343ddb8404208;p=gem5.git Add a generateDisassembly function to the MicroFault StaticInst. --HG-- extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835 --- diff --git a/src/arch/x86/isa/microops/specop.isa b/src/arch/x86/isa/microops/specop.isa index 4d9957587..5c9e8dda9 100644 --- a/src/arch/x86/isa/microops/specop.isa +++ b/src/arch/x86/isa/microops/specop.isa @@ -75,6 +75,9 @@ output header {{ Fault _fault); %(BasicExecDeclare)s + + std::string generateDisassembly(Addr pc, + const SymbolTable *symtab) const; }; }}; @@ -106,6 +109,22 @@ output decoder {{ } }}; +output decoder {{ + std::string MicroFault::generateDisassembly(Addr pc, + const SymbolTable *symtab) const + { + std::stringstream response; + + printMnemonic(response, instMnem, mnemonic); + if(fault) + response << fault->name(); + else + response << "No Fault"; + + return response.str(); + } +}}; + let {{ class Fault(X86Microop): def __init__(self, fault):