static_inst.cc (5202:ff56fa8c2091) static_inst.cc (5232:d3801ea2792e)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 42 unchanged lines hidden (view full) ---

51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 *
55 * Authors: Gabe Black
56 */
57
58#include "arch/x86/insts/static_inst.hh"
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 42 unchanged lines hidden (view full) ---

51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 *
55 * Authors: Gabe Black
56 */
57
58#include "arch/x86/insts/static_inst.hh"
59#include "arch/x86/segmentregs.hh"
59
60namespace X86ISA
61{
62 void X86StaticInst::printMnemonic(std::ostream &os,
63 const char * mnemonic) const
64 {
65 ccprintf(os, "\t%s ", mnemonic);
66 }
67
68 void X86StaticInst::printMnemonic(std::ostream &os,
69 const char * instMnemonic, const char * mnemonic) const
70 {
71 ccprintf(os, "\t%s : %s ", instMnemonic, mnemonic);
72 }
73
74 void X86StaticInst::printSegment(std::ostream &os, int segment) const
75 {
76 switch (segment)
77 {
60
61namespace X86ISA
62{
63 void X86StaticInst::printMnemonic(std::ostream &os,
64 const char * mnemonic) const
65 {
66 ccprintf(os, "\t%s ", mnemonic);
67 }
68
69 void X86StaticInst::printMnemonic(std::ostream &os,
70 const char * instMnemonic, const char * mnemonic) const
71 {
72 ccprintf(os, "\t%s : %s ", instMnemonic, mnemonic);
73 }
74
75 void X86StaticInst::printSegment(std::ostream &os, int segment) const
76 {
77 switch (segment)
78 {
78 case 0:
79 case SEGMENT_REG_ES:
79 ccprintf(os, "ES");
80 break;
80 ccprintf(os, "ES");
81 break;
81 case 1:
82 case SEGMENT_REG_CS:
82 ccprintf(os, "CS");
83 break;
83 ccprintf(os, "CS");
84 break;
84 case 2:
85 case SEGMENT_REG_SS:
85 ccprintf(os, "SS");
86 break;
86 ccprintf(os, "SS");
87 break;
87 case 3:
88 case SEGMENT_REG_DS:
88 ccprintf(os, "DS");
89 break;
89 ccprintf(os, "DS");
90 break;
90 case 4:
91 case SEGMENT_REG_FS:
91 ccprintf(os, "FS");
92 break;
92 ccprintf(os, "FS");
93 break;
93 case 5:
94 case SEGMENT_REG_GS:
94 ccprintf(os, "GS");
95 break;
95 ccprintf(os, "GS");
96 break;
97 case SEGMENT_REG_INT:
98 ccprintf(os, "INT");
99 break;
96 default:
97 panic("Unrecognized segment %d\n", segment);
98 }
99 }
100
101 void
102 X86StaticInst::printSrcReg(std::ostream &os, int reg, int size) const
103 {

--- 127 unchanged lines hidden ---
100 default:
101 panic("Unrecognized segment %d\n", segment);
102 }
103 }
104
105 void
106 X86StaticInst::printSrcReg(std::ostream &os, int reg, int size) const
107 {

--- 127 unchanged lines hidden ---