diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-06-19 14:14:17 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-06-19 14:14:17 +0000 |
commit | 1012fd442708f30b7db64d9ec3914a0b09a970b0 (patch) | |
tree | 4404f3dbc9d46c9eeb29a0f8de57046529922fec /src/arch/x86 | |
parent | 7994fa94315e5f39337d073ea48718447a634410 (diff) | |
download | gem5-1012fd442708f30b7db64d9ec3914a0b09a970b0.tar.xz |
Add a function to print out segment names.
--HG--
extra : convert_revision : 8cbe3ca0d05165f7da5d6fa38c899ecc9e782511
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa/base.isa | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/arch/x86/isa/base.isa b/src/arch/x86/isa/base.isa index d9bd87f2d..eed969b47 100644 --- a/src/arch/x86/isa/base.isa +++ b/src/arch/x86/isa/base.isa @@ -182,6 +182,33 @@ output decoder {{ 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 X86StaticInst::printSrcReg(std::ostream &os, int reg) const { |