diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-07-18 16:09:35 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-07-18 16:09:35 -0700 |
commit | dffc40ff62e6901084efdef6806343ddb8404208 (patch) | |
tree | 6c4b1d652a4d2aa8181fe262a3911f600a0cffd9 | |
parent | 6fbcb225af4b17c9c9695c6a1d9ee2254ceae1af (diff) | |
download | gem5-dffc40ff62e6901084efdef6806343ddb8404208.tar.xz |
Add a generateDisassembly function to the MicroFault StaticInst.
--HG--
extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835
-rw-r--r-- | src/arch/x86/isa/microops/specop.isa | 19 |
1 files changed, 19 insertions, 0 deletions
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): |