summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-07-18 16:09:35 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-07-18 16:09:35 -0700
commitdffc40ff62e6901084efdef6806343ddb8404208 (patch)
tree6c4b1d652a4d2aa8181fe262a3911f600a0cffd9 /src/arch
parent6fbcb225af4b17c9c9695c6a1d9ee2254ceae1af (diff)
downloadgem5-dffc40ff62e6901084efdef6806343ddb8404208.tar.xz
Add a generateDisassembly function to the MicroFault StaticInst.
--HG-- extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/isa/microops/specop.isa19
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):