Add a generateDisassembly function to the MicroFault StaticInst.

--HG--
extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835
This commit is contained in:
Gabe Black 2007-07-18 16:09:35 -07:00
parent 6fbcb225af
commit dffc40ff62

View 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):