Add a generateDisassembly function to the MicroFault StaticInst.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 18 Jul 2007 23:09:35 +0000 (16:09 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 18 Jul 2007 23:09:35 +0000 (16:09 -0700)
--HG--
extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835

src/arch/x86/isa/microops/specop.isa

index 4d9957587612e1805a33b634235db3c1ccbf5460..5c9e8dda9e2ab86a98fd69daab627f08dac355e5 100644 (file)
@@ -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):