Add a generateDisassembly function to the MicroFault StaticInst.
--HG-- extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835
This commit is contained in:
parent
6fbcb225af
commit
dffc40ff62
|
@ -75,6 +75,9 @@ output header {{
|
||||||
Fault _fault);
|
Fault _fault);
|
||||||
|
|
||||||
%(BasicExecDeclare)s
|
%(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 {{
|
let {{
|
||||||
class Fault(X86Microop):
|
class Fault(X86Microop):
|
||||||
def __init__(self, fault):
|
def __init__(self, fault):
|
||||||
|
|
Loading…
Reference in a new issue