Add a function to print out segment names.
--HG-- extra : convert_revision : 8cbe3ca0d05165f7da5d6fa38c899ecc9e782511
This commit is contained in:
parent
7994fa9431
commit
1012fd4427
1 changed files with 27 additions and 0 deletions
|
@ -182,6 +182,33 @@ output decoder {{
|
||||||
ccprintf(os, "\t%s : %s ", instMnemonic, mnemonic);
|
ccprintf(os, "\t%s : %s ", instMnemonic, mnemonic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void printSegment(std::ostream &os, int segment)
|
||||||
|
{
|
||||||
|
switch (segment)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
ccprintf(os, "ES");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ccprintf(os, "CS");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ccprintf(os, "SS");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
ccprintf(os, "DS");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
ccprintf(os, "FS");
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
ccprintf(os, "GS");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
panic("Unrecognized segment %d\n", segment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
X86StaticInst::printSrcReg(std::ostream &os, int reg) const
|
X86StaticInst::printSrcReg(std::ostream &os, int reg) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue