emulenv.hh (4604:3ffdd00e6c02) emulenv.hh (4863:b6dacc9a39ff)
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 *

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

53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 *
55 * Authors: Gabe Black
56 */
57
58#ifndef __ARCH_X86_EMULENV_HH__
59#define __ARCH_X86_EMULENV_HH__
60
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 *

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

53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 *
55 * Authors: Gabe Black
56 */
57
58#ifndef __ARCH_X86_EMULENV_HH__
59#define __ARCH_X86_EMULENV_HH__
60
61#include "arch/x86/types.hh"
62#include "arch/x86/intregs.hh"
61#include "arch/x86/intregs.hh"
62#include "arch/x86/segmentregs.hh"
63#include "arch/x86/types.hh"
63
64namespace X86ISA
65{
66 struct EmulEnv
67 {
68 RegIndex reg;
69 RegIndex regm;
64
65namespace X86ISA
66{
67 struct EmulEnv
68 {
69 RegIndex reg;
70 RegIndex regm;
71 SegmentRegIndex seg;
70 uint8_t scale;
71 RegIndex index;
72 RegIndex base;
73 int dataSize;
74 int addressSize;
75 int stackSize;
76
77 EmulEnv(RegIndex _reg, RegIndex _regm,
78 int _dataSize, int _addressSize, int _stackSize) :
72 uint8_t scale;
73 RegIndex index;
74 RegIndex base;
75 int dataSize;
76 int addressSize;
77 int stackSize;
78
79 EmulEnv(RegIndex _reg, RegIndex _regm,
80 int _dataSize, int _addressSize, int _stackSize) :
79 reg(_reg), regm(_regm),
81 reg(_reg), regm(_regm), seg(SEGMENT_REG_DS),
80 scale(0), index(NUM_INTREGS),
81 base(NUM_INTREGS),
82 dataSize(_dataSize), addressSize(_addressSize),
83 stackSize(_stackSize)
84 {;}
85
86 void doModRM(const ExtMachInst & machInst);
87 };
88};
89
90#endif // __ARCH_X86_TYPES_HH__
82 scale(0), index(NUM_INTREGS),
83 base(NUM_INTREGS),
84 dataSize(_dataSize), addressSize(_addressSize),
85 stackSize(_stackSize)
86 {;}
87
88 void doModRM(const ExtMachInst & machInst);
89 };
90};
91
92#endif // __ARCH_X86_TYPES_HH__