ldstflags.hh revision 4679
112855Sgabeblack@google.com/* 212855Sgabeblack@google.com * Copyright (c) 2007 The Hewlett-Packard Development Company 312855Sgabeblack@google.com * All rights reserved. 412855Sgabeblack@google.com * 512855Sgabeblack@google.com * Redistribution and use of this software in source and binary forms, 612855Sgabeblack@google.com * with or without modification, are permitted provided that the 712855Sgabeblack@google.com * following conditions are met: 812855Sgabeblack@google.com * 912855Sgabeblack@google.com * The software must be used only for Non-Commercial Use which means any 1012855Sgabeblack@google.com * use which is NOT directed to receiving any direct monetary 1112855Sgabeblack@google.com * compensation for, or commercial advantage from such use. Illustrative 1212855Sgabeblack@google.com * examples of non-commercial use are academic research, personal study, 1312855Sgabeblack@google.com * teaching, education and corporate research & development. 1412855Sgabeblack@google.com * Illustrative examples of commercial use are distributing products for 1512855Sgabeblack@google.com * commercial advantage and providing services using the software for 1612855Sgabeblack@google.com * commercial advantage. 1712855Sgabeblack@google.com * 1812855Sgabeblack@google.com * If you wish to use this software or functionality therein that may be 1912855Sgabeblack@google.com * covered by patents for commercial use, please contact: 2012855Sgabeblack@google.com * Director of Intellectual Property Licensing 2112855Sgabeblack@google.com * Office of Strategy and Technology 2212855Sgabeblack@google.com * Hewlett-Packard Company 2312855Sgabeblack@google.com * 1501 Page Mill Road 2412855Sgabeblack@google.com * Palo Alto, California 94304 2512855Sgabeblack@google.com * 2612855Sgabeblack@google.com * Redistributions of source code must retain the above copyright notice, 2712855Sgabeblack@google.com * this list of conditions and the following disclaimer. Redistributions 2812855Sgabeblack@google.com * in binary form must reproduce the above copyright notice, this list of 2912855Sgabeblack@google.com * conditions and the following disclaimer in the documentation and/or 3012855Sgabeblack@google.com * other materials provided with the distribution. Neither the name of 3112855Sgabeblack@google.com * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 3212855Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 3312855Sgabeblack@google.com * this software without specific prior written permission. No right of 3412855Sgabeblack@google.com * sublicense is granted herewith. Derivatives of the software and 3512855Sgabeblack@google.com * output created using the software may be prepared, but only for 3612855Sgabeblack@google.com * Non-Commercial Uses. Derivatives of the software may be shared with 3712855Sgabeblack@google.com * others provided: (i) the others agree to abide by the list of 3812855Sgabeblack@google.com * conditions herein which includes the Non-Commercial Use restrictions; 3912855Sgabeblack@google.com * and (ii) such Derivatives of the software include the above copyright 4012855Sgabeblack@google.com * notice to acknowledge the contribution from this software where 4112855Sgabeblack@google.com * applicable, this list of conditions and the disclaimer below. 4212855Sgabeblack@google.com * 4312855Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 4412855Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 4512855Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 4612855Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 4712855Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4812855Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 4912855Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5012855Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5112855Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5212855Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5312855Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5412855Sgabeblack@google.com * 5512855Sgabeblack@google.com * Authors: Gabe Black 5612855Sgabeblack@google.com */ 5712855Sgabeblack@google.com 5812855Sgabeblack@google.com#ifndef __ARCH_X86_INSTS_MICROLDSTOP_HH__ 5912855Sgabeblack@google.com#define __ARCH_X86_INSTS_MICROLDSTOP_HH__ 6012855Sgabeblack@google.com 6112855Sgabeblack@google.com#include "arch/x86/insts/microop.hh" 6212855Sgabeblack@google.com 6312855Sgabeblack@google.comnamespace X86ISA 6412855Sgabeblack@google.com{ 6512855Sgabeblack@google.com /** 6612855Sgabeblack@google.com * Base class for load and store ops 6712855Sgabeblack@google.com */ 6812855Sgabeblack@google.com class LdStOp : public X86MicroopBase 6912855Sgabeblack@google.com { 7012855Sgabeblack@google.com protected: 7112855Sgabeblack@google.com const uint8_t scale; 7212855Sgabeblack@google.com const RegIndex index; 7312855Sgabeblack@google.com const RegIndex base; 7412855Sgabeblack@google.com const uint64_t disp; 7512855Sgabeblack@google.com const uint8_t segment; 7612855Sgabeblack@google.com const RegIndex data; 7712855Sgabeblack@google.com const uint8_t dataSize; 7812855Sgabeblack@google.com const uint8_t addressSize; 7912855Sgabeblack@google.com 8012855Sgabeblack@google.com //Constructor 8112855Sgabeblack@google.com LdStOp(ExtMachInst _machInst, 8212855Sgabeblack@google.com const char * mnem, const char * _instMnem, 8312855Sgabeblack@google.com bool isMicro, bool isDelayed, bool isFirst, bool isLast, 8412855Sgabeblack@google.com uint8_t _scale, RegIndex _index, RegIndex _base, 8512855Sgabeblack@google.com uint64_t _disp, uint8_t _segment, 8612855Sgabeblack@google.com RegIndex _data, 8712855Sgabeblack@google.com uint8_t _dataSize, uint8_t _addressSize, 8812855Sgabeblack@google.com OpClass __opClass) : 8912855Sgabeblack@google.com X86MicroopBase(machInst, mnem, _instMnem, 9012855Sgabeblack@google.com isMicro, isDelayed, isFirst, isLast, __opClass), 9112855Sgabeblack@google.com scale(_scale), index(_index), base(_base), 9212855Sgabeblack@google.com disp(_disp), segment(_segment), 9312855Sgabeblack@google.com data(_data), 9412855Sgabeblack@google.com dataSize(_dataSize), addressSize(_addressSize) 9512855Sgabeblack@google.com {} 9612855Sgabeblack@google.com 9712855Sgabeblack@google.com std::string generateDisassembly(Addr pc, 98 const SymbolTable *symtab) const; 99 }; 100} 101 102#endif //__ARCH_X86_INSTS_MICROLDSTOP_HH__ 103