microldstop.hh revision 4679
112150Sgabor.dozsa@arm.com/*
212150Sgabor.dozsa@arm.com * Copyright (c) 2007 The Hewlett-Packard Development Company
312150Sgabor.dozsa@arm.com * All rights reserved.
412150Sgabor.dozsa@arm.com *
512150Sgabor.dozsa@arm.com * Redistribution and use of this software in source and binary forms,
612150Sgabor.dozsa@arm.com * with or without modification, are permitted provided that the
712150Sgabor.dozsa@arm.com * following conditions are met:
812150Sgabor.dozsa@arm.com *
912150Sgabor.dozsa@arm.com * The software must be used only for Non-Commercial Use which means any
1012150Sgabor.dozsa@arm.com * use which is NOT directed to receiving any direct monetary
1112150Sgabor.dozsa@arm.com * compensation for, or commercial advantage from such use.  Illustrative
1212150Sgabor.dozsa@arm.com * examples of non-commercial use are academic research, personal study,
1312150Sgabor.dozsa@arm.com * teaching, education and corporate research & development.
1412150Sgabor.dozsa@arm.com * Illustrative examples of commercial use are distributing products for
1512150Sgabor.dozsa@arm.com * commercial advantage and providing services using the software for
1612150Sgabor.dozsa@arm.com * commercial advantage.
1712150Sgabor.dozsa@arm.com *
1812150Sgabor.dozsa@arm.com * If you wish to use this software or functionality therein that may be
1912150Sgabor.dozsa@arm.com * covered by patents for commercial use, please contact:
2012150Sgabor.dozsa@arm.com *     Director of Intellectual Property Licensing
2112150Sgabor.dozsa@arm.com *     Office of Strategy and Technology
2212150Sgabor.dozsa@arm.com *     Hewlett-Packard Company
2312150Sgabor.dozsa@arm.com *     1501 Page Mill Road
2412150Sgabor.dozsa@arm.com *     Palo Alto, California  94304
2512150Sgabor.dozsa@arm.com *
2612150Sgabor.dozsa@arm.com * Redistributions of source code must retain the above copyright notice,
2712150Sgabor.dozsa@arm.com * this list of conditions and the following disclaimer.  Redistributions
2812150Sgabor.dozsa@arm.com * in binary form must reproduce the above copyright notice, this list of
2912150Sgabor.dozsa@arm.com * conditions and the following disclaimer in the documentation and/or
3012150Sgabor.dozsa@arm.com * other materials provided with the distribution.  Neither the name of
3112150Sgabor.dozsa@arm.com * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
3212150Sgabor.dozsa@arm.com * contributors may be used to endorse or promote products derived from
3312150Sgabor.dozsa@arm.com * this software without specific prior written permission.  No right of
3412150Sgabor.dozsa@arm.com * sublicense is granted herewith.  Derivatives of the software and
3512150Sgabor.dozsa@arm.com * output created using the software may be prepared, but only for
3612150Sgabor.dozsa@arm.com * Non-Commercial Uses.  Derivatives of the software may be shared with
3712150Sgabor.dozsa@arm.com * others provided: (i) the others agree to abide by the list of
3812150Sgabor.dozsa@arm.com * conditions herein which includes the Non-Commercial Use restrictions;
3912150Sgabor.dozsa@arm.com * and (ii) such Derivatives of the software include the above copyright
4012150Sgabor.dozsa@arm.com * notice to acknowledge the contribution from this software where
4112150Sgabor.dozsa@arm.com * applicable, this list of conditions and the disclaimer below.
4212150Sgabor.dozsa@arm.com *
4312150Sgabor.dozsa@arm.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4412150Sgabor.dozsa@arm.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4512150Sgabor.dozsa@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4612564Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4713774Sandreas.sandberg@arm.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4812564Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4912150Sgabor.dozsa@arm.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5012150Sgabor.dozsa@arm.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5112150Sgabor.dozsa@arm.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5212150Sgabor.dozsa@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5313609Sgiacomo.travaglini@arm.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5412150Sgabor.dozsa@arm.com *
5512150Sgabor.dozsa@arm.com * Authors: Gabe Black
5612150Sgabor.dozsa@arm.com */
5712150Sgabor.dozsa@arm.com
5812150Sgabor.dozsa@arm.com#ifndef __ARCH_X86_INSTS_MICROLDSTOP_HH__
5912150Sgabor.dozsa@arm.com#define __ARCH_X86_INSTS_MICROLDSTOP_HH__
6012150Sgabor.dozsa@arm.com
6112150Sgabor.dozsa@arm.com#include "arch/x86/insts/microop.hh"
6212150Sgabor.dozsa@arm.com
6312150Sgabor.dozsa@arm.comnamespace X86ISA
6412150Sgabor.dozsa@arm.com{
6512150Sgabor.dozsa@arm.com    /**
6612150Sgabor.dozsa@arm.com     * Base class for load and store ops
6712150Sgabor.dozsa@arm.com     */
6812150Sgabor.dozsa@arm.com    class LdStOp : public X86MicroopBase
6912150Sgabor.dozsa@arm.com    {
7012150Sgabor.dozsa@arm.com      protected:
7112150Sgabor.dozsa@arm.com        const uint8_t scale;
7212150Sgabor.dozsa@arm.com        const RegIndex index;
7312150Sgabor.dozsa@arm.com        const RegIndex base;
7412150Sgabor.dozsa@arm.com        const uint64_t disp;
7512150Sgabor.dozsa@arm.com        const uint8_t segment;
7612150Sgabor.dozsa@arm.com        const RegIndex data;
7712150Sgabor.dozsa@arm.com        const uint8_t dataSize;
7812150Sgabor.dozsa@arm.com        const uint8_t addressSize;
7912150Sgabor.dozsa@arm.com
8012150Sgabor.dozsa@arm.com        //Constructor
8112150Sgabor.dozsa@arm.com        LdStOp(ExtMachInst _machInst,
8212150Sgabor.dozsa@arm.com                const char * mnem, const char * _instMnem,
8312150Sgabor.dozsa@arm.com                bool isMicro, bool isDelayed, bool isFirst, bool isLast,
8412150Sgabor.dozsa@arm.com                uint8_t _scale, RegIndex _index, RegIndex _base,
8512150Sgabor.dozsa@arm.com                uint64_t _disp, uint8_t _segment,
8612150Sgabor.dozsa@arm.com                RegIndex _data,
8712150Sgabor.dozsa@arm.com                uint8_t _dataSize, uint8_t _addressSize,
8812150Sgabor.dozsa@arm.com                OpClass __opClass) :
8912150Sgabor.dozsa@arm.com        X86MicroopBase(machInst, mnem, _instMnem,
9012150Sgabor.dozsa@arm.com                isMicro, isDelayed, isFirst, isLast, __opClass),
9112150Sgabor.dozsa@arm.com                scale(_scale), index(_index), base(_base),
9212150Sgabor.dozsa@arm.com                disp(_disp), segment(_segment),
9312150Sgabor.dozsa@arm.com                data(_data),
9412150Sgabor.dozsa@arm.com                dataSize(_dataSize), addressSize(_addressSize)
9512150Sgabor.dozsa@arm.com        {}
9612150Sgabor.dozsa@arm.com
9712150Sgabor.dozsa@arm.com        std::string generateDisassembly(Addr pc,
9812564Sgabeblack@google.com            const SymbolTable *symtab) const;
9912150Sgabor.dozsa@arm.com    };
10012150Sgabor.dozsa@arm.com}
10112150Sgabor.dozsa@arm.com
10212150Sgabor.dozsa@arm.com#endif //__ARCH_X86_INSTS_MICROLDSTOP_HH__
10312150Sgabor.dozsa@arm.com