microldstop.hh (5727:8b9aaeac5bab) | microldstop.hh (5912:d113f6def227) |
---|---|
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 * --- 46 unchanged lines hidden (view full) --- 55 * Authors: Gabe Black 56 */ 57 58#ifndef __ARCH_X86_INSTS_MICROLDSTOP_HH__ 59#define __ARCH_X86_INSTS_MICROLDSTOP_HH__ 60 61#include "arch/x86/insts/microop.hh" 62#include "mem/packet.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 * --- 46 unchanged lines hidden (view full) --- 55 * Authors: Gabe Black 56 */ 57 58#ifndef __ARCH_X86_INSTS_MICROLDSTOP_HH__ 59#define __ARCH_X86_INSTS_MICROLDSTOP_HH__ 60 61#include "arch/x86/insts/microop.hh" 62#include "mem/packet.hh" |
63#include "mem/request.hh" |
|
63 64namespace X86ISA 65{ | 64 65namespace X86ISA 66{ |
67 static const Request::FlagsType SegmentFlagMask = mask(4); 68 static const int FlagShift = 4; 69 enum FlagBit { 70 CPL0FlagBit = 1 71 }; 72 |
|
66 /** 67 * Base class for load and store ops 68 */ 69 class LdStOp : public X86MicroopBase 70 { 71 protected: 72 const uint8_t scale; 73 const RegIndex index; 74 const RegIndex base; 75 const uint64_t disp; 76 const uint8_t segment; 77 const RegIndex data; 78 const uint8_t dataSize; 79 const uint8_t addressSize; | 73 /** 74 * Base class for load and store ops 75 */ 76 class LdStOp : public X86MicroopBase 77 { 78 protected: 79 const uint8_t scale; 80 const RegIndex index; 81 const RegIndex base; 82 const uint64_t disp; 83 const uint8_t segment; 84 const RegIndex data; 85 const uint8_t dataSize; 86 const uint8_t addressSize; |
87 const Request::FlagsType memFlags; |
|
80 RegIndex foldOBit, foldABit; 81 82 //Constructor 83 LdStOp(ExtMachInst _machInst, 84 const char * mnem, const char * _instMnem, 85 bool isMicro, bool isDelayed, bool isFirst, bool isLast, 86 uint8_t _scale, RegIndex _index, RegIndex _base, 87 uint64_t _disp, uint8_t _segment, 88 RegIndex _data, 89 uint8_t _dataSize, uint8_t _addressSize, | 88 RegIndex foldOBit, foldABit; 89 90 //Constructor 91 LdStOp(ExtMachInst _machInst, 92 const char * mnem, const char * _instMnem, 93 bool isMicro, bool isDelayed, bool isFirst, bool isLast, 94 uint8_t _scale, RegIndex _index, RegIndex _base, 95 uint64_t _disp, uint8_t _segment, 96 RegIndex _data, 97 uint8_t _dataSize, uint8_t _addressSize, |
98 Request::FlagsType _memFlags, |
|
90 OpClass __opClass) : 91 X86MicroopBase(machInst, mnem, _instMnem, 92 isMicro, isDelayed, isFirst, isLast, __opClass), 93 scale(_scale), index(_index), base(_base), 94 disp(_disp), segment(_segment), 95 data(_data), | 99 OpClass __opClass) : 100 X86MicroopBase(machInst, mnem, _instMnem, 101 isMicro, isDelayed, isFirst, isLast, __opClass), 102 scale(_scale), index(_index), base(_base), 103 disp(_disp), segment(_segment), 104 data(_data), |
96 dataSize(_dataSize), addressSize(_addressSize) | 105 dataSize(_dataSize), addressSize(_addressSize), 106 memFlags(_memFlags | _segment) |
97 { 98 foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0; 99 foldABit = 100 (addressSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0; 101 } 102 103 std::string generateDisassembly(Addr pc, 104 const SymbolTable *symtab) const; --- 71 unchanged lines hidden --- | 107 { 108 foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0; 109 foldABit = 110 (addressSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0; 111 } 112 113 std::string generateDisassembly(Addr pc, 114 const SymbolTable *symtab) const; --- 71 unchanged lines hidden --- |