mem.hh revision 7428
17118Sgblack@eecs.umich.edu/* 27118Sgblack@eecs.umich.edu * Copyright (c) 2010 ARM Limited 37118Sgblack@eecs.umich.edu * All rights reserved 47118Sgblack@eecs.umich.edu * 57118Sgblack@eecs.umich.edu * The license below extends only to copyright in the software and shall 67118Sgblack@eecs.umich.edu * not be construed as granting a license to any other intellectual 77118Sgblack@eecs.umich.edu * property including but not limited to intellectual property relating 87118Sgblack@eecs.umich.edu * to a hardware implementation of the functionality of the software 97118Sgblack@eecs.umich.edu * licensed hereunder. You may use the software subject to the license 107118Sgblack@eecs.umich.edu * terms below provided that you ensure that this notice is replicated 117118Sgblack@eecs.umich.edu * unmodified and in its entirety in all distributions of the software, 127118Sgblack@eecs.umich.edu * modified or unmodified, in source code or in binary form. 137118Sgblack@eecs.umich.edu * 147118Sgblack@eecs.umich.edu * Copyright (c) 2007-2008 The Florida State University 156253Sgblack@eecs.umich.edu * All rights reserved. 166253Sgblack@eecs.umich.edu * 176253Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 186253Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 196253Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 206253Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 216253Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 226253Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 236253Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 246253Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 256253Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 266253Sgblack@eecs.umich.edu * this software without specific prior written permission. 276253Sgblack@eecs.umich.edu * 286253Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 296253Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 306253Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 316253Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 326253Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 336253Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 346253Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 356253Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 366253Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 376253Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 386253Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 396253Sgblack@eecs.umich.edu * 406253Sgblack@eecs.umich.edu * Authors: Stephen Hines 416253Sgblack@eecs.umich.edu */ 426253Sgblack@eecs.umich.edu#ifndef __ARCH_ARM_MEM_HH__ 436253Sgblack@eecs.umich.edu#define __ARCH_ARM_MEM_HH__ 446253Sgblack@eecs.umich.edu 456253Sgblack@eecs.umich.edu#include "arch/arm/insts/pred_inst.hh" 466253Sgblack@eecs.umich.edu 476253Sgblack@eecs.umich.edunamespace ArmISA 486253Sgblack@eecs.umich.edu{ 497118Sgblack@eecs.umich.edu 507205Sgblack@eecs.umich.educlass Swap : public PredOp 517205Sgblack@eecs.umich.edu{ 527205Sgblack@eecs.umich.edu protected: 537205Sgblack@eecs.umich.edu IntRegIndex dest; 547205Sgblack@eecs.umich.edu IntRegIndex op1; 557205Sgblack@eecs.umich.edu IntRegIndex base; 567205Sgblack@eecs.umich.edu 577205Sgblack@eecs.umich.edu Swap(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 587205Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _base) 597205Sgblack@eecs.umich.edu : PredOp(mnem, _machInst, __opClass), 607205Sgblack@eecs.umich.edu dest(_dest), op1(_op1), base(_base) 617205Sgblack@eecs.umich.edu {} 627205Sgblack@eecs.umich.edu 637205Sgblack@eecs.umich.edu std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; 647205Sgblack@eecs.umich.edu}; 657205Sgblack@eecs.umich.edu 667291Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 677291Sgblack@eecs.umich.educlass RfeOp : public PredOp 687291Sgblack@eecs.umich.edu{ 697291Sgblack@eecs.umich.edu public: 707291Sgblack@eecs.umich.edu enum AddrMode { 717291Sgblack@eecs.umich.edu DecrementAfter, 727291Sgblack@eecs.umich.edu DecrementBefore, 737291Sgblack@eecs.umich.edu IncrementAfter, 747291Sgblack@eecs.umich.edu IncrementBefore 757291Sgblack@eecs.umich.edu }; 767291Sgblack@eecs.umich.edu protected: 777291Sgblack@eecs.umich.edu IntRegIndex base; 787291Sgblack@eecs.umich.edu AddrMode mode; 797291Sgblack@eecs.umich.edu bool wb; 807291Sgblack@eecs.umich.edu 817291Sgblack@eecs.umich.edu RfeOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 827291Sgblack@eecs.umich.edu IntRegIndex _base, AddrMode _mode, bool _wb) 837291Sgblack@eecs.umich.edu : PredOp(mnem, _machInst, __opClass), 847291Sgblack@eecs.umich.edu base(_base), mode(_mode), wb(_wb) 857291Sgblack@eecs.umich.edu {} 867291Sgblack@eecs.umich.edu 877291Sgblack@eecs.umich.edu std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; 887291Sgblack@eecs.umich.edu}; 897291Sgblack@eecs.umich.edu 907312Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 917312Sgblack@eecs.umich.educlass SrsOp : public PredOp 927312Sgblack@eecs.umich.edu{ 937312Sgblack@eecs.umich.edu public: 947312Sgblack@eecs.umich.edu enum AddrMode { 957312Sgblack@eecs.umich.edu DecrementAfter, 967312Sgblack@eecs.umich.edu DecrementBefore, 977312Sgblack@eecs.umich.edu IncrementAfter, 987312Sgblack@eecs.umich.edu IncrementBefore 997312Sgblack@eecs.umich.edu }; 1007312Sgblack@eecs.umich.edu protected: 1017312Sgblack@eecs.umich.edu uint32_t regMode; 1027312Sgblack@eecs.umich.edu AddrMode mode; 1037312Sgblack@eecs.umich.edu bool wb; 1047312Sgblack@eecs.umich.edu 1057312Sgblack@eecs.umich.edu SrsOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1067312Sgblack@eecs.umich.edu uint32_t _regMode, AddrMode _mode, bool _wb) 1077312Sgblack@eecs.umich.edu : PredOp(mnem, _machInst, __opClass), 1087312Sgblack@eecs.umich.edu regMode(_regMode), mode(_mode), wb(_wb) 1097312Sgblack@eecs.umich.edu {} 1107312Sgblack@eecs.umich.edu 1117312Sgblack@eecs.umich.edu std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; 1127312Sgblack@eecs.umich.edu}; 1137312Sgblack@eecs.umich.edu 1147132Sgblack@eecs.umich.educlass Memory : public PredOp 1157118Sgblack@eecs.umich.edu{ 1167118Sgblack@eecs.umich.edu public: 1177118Sgblack@eecs.umich.edu enum AddrMode { 1187118Sgblack@eecs.umich.edu AddrMd_Offset, 1197118Sgblack@eecs.umich.edu AddrMd_PreIndex, 1207118Sgblack@eecs.umich.edu AddrMd_PostIndex 1217118Sgblack@eecs.umich.edu }; 1227118Sgblack@eecs.umich.edu 1237118Sgblack@eecs.umich.edu protected: 1247118Sgblack@eecs.umich.edu 1257118Sgblack@eecs.umich.edu IntRegIndex dest; 1267118Sgblack@eecs.umich.edu IntRegIndex base; 1277118Sgblack@eecs.umich.edu bool add; 1287118Sgblack@eecs.umich.edu 1297132Sgblack@eecs.umich.edu Memory(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1307132Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _base, bool _add) 1317118Sgblack@eecs.umich.edu : PredOp(mnem, _machInst, __opClass), 1327118Sgblack@eecs.umich.edu dest(_dest), base(_base), add(_add) 1337118Sgblack@eecs.umich.edu {} 1347118Sgblack@eecs.umich.edu 1357118Sgblack@eecs.umich.edu virtual void 1367118Sgblack@eecs.umich.edu printOffset(std::ostream &os) const 1377118Sgblack@eecs.umich.edu {} 1387118Sgblack@eecs.umich.edu 1397279Sgblack@eecs.umich.edu virtual void 1407279Sgblack@eecs.umich.edu printDest(std::ostream &os) const 1417279Sgblack@eecs.umich.edu { 1427279Sgblack@eecs.umich.edu printReg(os, dest); 1437279Sgblack@eecs.umich.edu } 1447279Sgblack@eecs.umich.edu 1457118Sgblack@eecs.umich.edu void printInst(std::ostream &os, AddrMode addrMode) const; 1467118Sgblack@eecs.umich.edu}; 1477118Sgblack@eecs.umich.edu 1487118Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 1497132Sgblack@eecs.umich.educlass MemoryImm : public Memory 1507118Sgblack@eecs.umich.edu{ 1517118Sgblack@eecs.umich.edu protected: 1527118Sgblack@eecs.umich.edu int32_t imm; 1537118Sgblack@eecs.umich.edu 1547132Sgblack@eecs.umich.edu MemoryImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1557132Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _base, bool _add, int32_t _imm) 1567132Sgblack@eecs.umich.edu : Memory(mnem, _machInst, __opClass, _dest, _base, _add), imm(_imm) 1577118Sgblack@eecs.umich.edu {} 1587118Sgblack@eecs.umich.edu 1597118Sgblack@eecs.umich.edu void 1607118Sgblack@eecs.umich.edu printOffset(std::ostream &os) const 1617118Sgblack@eecs.umich.edu { 1627118Sgblack@eecs.umich.edu int32_t pImm = imm; 1637118Sgblack@eecs.umich.edu if (!add) 1647118Sgblack@eecs.umich.edu pImm = -pImm; 1657118Sgblack@eecs.umich.edu ccprintf(os, "#%d", pImm); 1667118Sgblack@eecs.umich.edu } 1677118Sgblack@eecs.umich.edu}; 1687118Sgblack@eecs.umich.edu 1697303Sgblack@eecs.umich.educlass MemoryExImm : public MemoryImm 1707303Sgblack@eecs.umich.edu{ 1717303Sgblack@eecs.umich.edu protected: 1727303Sgblack@eecs.umich.edu IntRegIndex result; 1737303Sgblack@eecs.umich.edu 1747303Sgblack@eecs.umich.edu MemoryExImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1757303Sgblack@eecs.umich.edu IntRegIndex _result, IntRegIndex _dest, IntRegIndex _base, 1767303Sgblack@eecs.umich.edu bool _add, int32_t _imm) 1777303Sgblack@eecs.umich.edu : MemoryImm(mnem, _machInst, __opClass, _dest, _base, _add, _imm), 1787303Sgblack@eecs.umich.edu result(_result) 1797303Sgblack@eecs.umich.edu {} 1807303Sgblack@eecs.umich.edu 1817303Sgblack@eecs.umich.edu void 1827303Sgblack@eecs.umich.edu printDest(std::ostream &os) const 1837303Sgblack@eecs.umich.edu { 1847303Sgblack@eecs.umich.edu printReg(os, result); 1857303Sgblack@eecs.umich.edu os << ", "; 1867303Sgblack@eecs.umich.edu MemoryImm::printDest(os); 1877303Sgblack@eecs.umich.edu } 1887303Sgblack@eecs.umich.edu}; 1897303Sgblack@eecs.umich.edu 1907279Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 1917279Sgblack@eecs.umich.educlass MemoryDImm : public MemoryImm 1927279Sgblack@eecs.umich.edu{ 1937279Sgblack@eecs.umich.edu protected: 1947279Sgblack@eecs.umich.edu IntRegIndex dest2; 1957279Sgblack@eecs.umich.edu 1967279Sgblack@eecs.umich.edu MemoryDImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1977279Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 1987279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 1997279Sgblack@eecs.umich.edu : MemoryImm(mnem, _machInst, __opClass, _dest, _base, _add, _imm), 2007279Sgblack@eecs.umich.edu dest2(_dest2) 2017279Sgblack@eecs.umich.edu {} 2027279Sgblack@eecs.umich.edu 2037279Sgblack@eecs.umich.edu void 2047279Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2057279Sgblack@eecs.umich.edu { 2067279Sgblack@eecs.umich.edu MemoryImm::printDest(os); 2077279Sgblack@eecs.umich.edu os << ", "; 2087279Sgblack@eecs.umich.edu printReg(os, dest2); 2097279Sgblack@eecs.umich.edu } 2107279Sgblack@eecs.umich.edu}; 2117279Sgblack@eecs.umich.edu 2127303Sgblack@eecs.umich.educlass MemoryExDImm : public MemoryDImm 2137303Sgblack@eecs.umich.edu{ 2147303Sgblack@eecs.umich.edu protected: 2157303Sgblack@eecs.umich.edu IntRegIndex result; 2167303Sgblack@eecs.umich.edu 2177303Sgblack@eecs.umich.edu MemoryExDImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2187303Sgblack@eecs.umich.edu IntRegIndex _result, IntRegIndex _dest, IntRegIndex _dest2, 2197303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 2207303Sgblack@eecs.umich.edu : MemoryDImm(mnem, _machInst, __opClass, _dest, _dest2, 2217303Sgblack@eecs.umich.edu _base, _add, _imm), result(_result) 2227303Sgblack@eecs.umich.edu {} 2237303Sgblack@eecs.umich.edu 2247303Sgblack@eecs.umich.edu void 2257303Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2267303Sgblack@eecs.umich.edu { 2277303Sgblack@eecs.umich.edu printReg(os, result); 2287303Sgblack@eecs.umich.edu os << ", "; 2297303Sgblack@eecs.umich.edu MemoryDImm::printDest(os); 2307303Sgblack@eecs.umich.edu } 2317303Sgblack@eecs.umich.edu}; 2327303Sgblack@eecs.umich.edu 2337118Sgblack@eecs.umich.edu// The address is a shifted register plus an immediate 2347132Sgblack@eecs.umich.educlass MemoryReg : public Memory 2357118Sgblack@eecs.umich.edu{ 2367118Sgblack@eecs.umich.edu protected: 2377118Sgblack@eecs.umich.edu int32_t shiftAmt; 2387118Sgblack@eecs.umich.edu ArmShiftType shiftType; 2397118Sgblack@eecs.umich.edu IntRegIndex index; 2407118Sgblack@eecs.umich.edu 2417132Sgblack@eecs.umich.edu MemoryReg(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2427132Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _base, bool _add, 2437132Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 2447132Sgblack@eecs.umich.edu IntRegIndex _index) 2457132Sgblack@eecs.umich.edu : Memory(mnem, _machInst, __opClass, _dest, _base, _add), 2467118Sgblack@eecs.umich.edu shiftAmt(_shiftAmt), shiftType(_shiftType), index(_index) 2477118Sgblack@eecs.umich.edu {} 2487118Sgblack@eecs.umich.edu 2497428Sgblack@eecs.umich.edu void printOffset(std::ostream &os) const; 2507118Sgblack@eecs.umich.edu}; 2517118Sgblack@eecs.umich.edu 2527279Sgblack@eecs.umich.educlass MemoryDReg : public MemoryReg 2537279Sgblack@eecs.umich.edu{ 2547279Sgblack@eecs.umich.edu protected: 2557279Sgblack@eecs.umich.edu IntRegIndex dest2; 2567279Sgblack@eecs.umich.edu 2577279Sgblack@eecs.umich.edu MemoryDReg(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2587279Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 2597279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 2607279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 2617279Sgblack@eecs.umich.edu IntRegIndex _index) 2627279Sgblack@eecs.umich.edu : MemoryReg(mnem, _machInst, __opClass, _dest, _base, _add, 2637279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index), 2647279Sgblack@eecs.umich.edu dest2(_dest2) 2657279Sgblack@eecs.umich.edu {} 2667279Sgblack@eecs.umich.edu 2677279Sgblack@eecs.umich.edu void 2687279Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2697279Sgblack@eecs.umich.edu { 2707279Sgblack@eecs.umich.edu MemoryReg::printDest(os); 2717279Sgblack@eecs.umich.edu os << ", "; 2727279Sgblack@eecs.umich.edu printReg(os, dest2); 2737279Sgblack@eecs.umich.edu } 2747279Sgblack@eecs.umich.edu}; 2757279Sgblack@eecs.umich.edu 2767118Sgblack@eecs.umich.edutemplate<class Base> 2777132Sgblack@eecs.umich.educlass MemoryOffset : public Base 2787118Sgblack@eecs.umich.edu{ 2797118Sgblack@eecs.umich.edu protected: 2807132Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 2817132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 2827132Sgblack@eecs.umich.edu bool _add, int32_t _imm) 2837132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm) 2847132Sgblack@eecs.umich.edu {} 2857132Sgblack@eecs.umich.edu 2867132Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 2877132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 2887132Sgblack@eecs.umich.edu bool _add, int32_t _shiftAmt, ArmShiftType _shiftType, 2897132Sgblack@eecs.umich.edu IntRegIndex _index) 2907132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, 2917132Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 2927132Sgblack@eecs.umich.edu {} 2937132Sgblack@eecs.umich.edu 2947279Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 2957279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 2967279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 2977279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, _imm) 2987279Sgblack@eecs.umich.edu {} 2997279Sgblack@eecs.umich.edu 3007279Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3017303Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _result, 3027303Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 3037303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 3047303Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _result, 3057303Sgblack@eecs.umich.edu _dest, _dest2, _base, _add, _imm) 3067303Sgblack@eecs.umich.edu {} 3077303Sgblack@eecs.umich.edu 3087303Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3097279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 3107279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 3117279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 3127279Sgblack@eecs.umich.edu IntRegIndex _index) 3137279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, 3147279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 3157279Sgblack@eecs.umich.edu {} 3167279Sgblack@eecs.umich.edu 3177132Sgblack@eecs.umich.edu std::string 3187132Sgblack@eecs.umich.edu generateDisassembly(Addr pc, const SymbolTable *symtab) const 3197132Sgblack@eecs.umich.edu { 3207132Sgblack@eecs.umich.edu std::stringstream ss; 3217132Sgblack@eecs.umich.edu this->printInst(ss, Memory::AddrMd_Offset); 3227132Sgblack@eecs.umich.edu return ss.str(); 3237132Sgblack@eecs.umich.edu } 3247132Sgblack@eecs.umich.edu}; 3257132Sgblack@eecs.umich.edu 3267132Sgblack@eecs.umich.edutemplate<class Base> 3277132Sgblack@eecs.umich.educlass MemoryPreIndex : public Base 3287132Sgblack@eecs.umich.edu{ 3297132Sgblack@eecs.umich.edu protected: 3307132Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 3317132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 3327132Sgblack@eecs.umich.edu bool _add, int32_t _imm) 3337132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm) 3347132Sgblack@eecs.umich.edu {} 3357132Sgblack@eecs.umich.edu 3367132Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 3377132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 3387132Sgblack@eecs.umich.edu bool _add, int32_t _shiftAmt, ArmShiftType _shiftType, 3397132Sgblack@eecs.umich.edu IntRegIndex _index) 3407132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, 3417132Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 3427132Sgblack@eecs.umich.edu {} 3437132Sgblack@eecs.umich.edu 3447279Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 3457279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 3467279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 3477279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, _imm) 3487279Sgblack@eecs.umich.edu {} 3497279Sgblack@eecs.umich.edu 3507279Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 3517303Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _result, 3527303Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 3537303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 3547303Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _result, 3557303Sgblack@eecs.umich.edu _dest, _dest2, _base, _add, _imm) 3567303Sgblack@eecs.umich.edu {} 3577303Sgblack@eecs.umich.edu 3587303Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 3597279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 3607279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 3617279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 3627279Sgblack@eecs.umich.edu IntRegIndex _index) 3637279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, 3647279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 3657279Sgblack@eecs.umich.edu {} 3667279Sgblack@eecs.umich.edu 3677132Sgblack@eecs.umich.edu std::string 3687132Sgblack@eecs.umich.edu generateDisassembly(Addr pc, const SymbolTable *symtab) const 3697132Sgblack@eecs.umich.edu { 3707132Sgblack@eecs.umich.edu std::stringstream ss; 3717132Sgblack@eecs.umich.edu this->printInst(ss, Memory::AddrMd_PreIndex); 3727132Sgblack@eecs.umich.edu return ss.str(); 3737132Sgblack@eecs.umich.edu } 3747132Sgblack@eecs.umich.edu}; 3757132Sgblack@eecs.umich.edu 3767132Sgblack@eecs.umich.edutemplate<class Base> 3777132Sgblack@eecs.umich.educlass MemoryPostIndex : public Base 3787132Sgblack@eecs.umich.edu{ 3797132Sgblack@eecs.umich.edu protected: 3807132Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 3817118Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 3827118Sgblack@eecs.umich.edu bool _add, int32_t _imm) 3837118Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm) 3847118Sgblack@eecs.umich.edu {} 3857118Sgblack@eecs.umich.edu 3867132Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 3877118Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 3887118Sgblack@eecs.umich.edu bool _add, int32_t _shiftAmt, ArmShiftType _shiftType, 3897118Sgblack@eecs.umich.edu IntRegIndex _index) 3907118Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, 3917118Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 3927118Sgblack@eecs.umich.edu {} 3937118Sgblack@eecs.umich.edu 3947279Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 3957279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 3967279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 3977279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, _imm) 3987279Sgblack@eecs.umich.edu {} 3997279Sgblack@eecs.umich.edu 4007279Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4017303Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _result, 4027303Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 4037303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 4047303Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _result, 4057303Sgblack@eecs.umich.edu _dest, _dest2, _base, _add, _imm) 4067303Sgblack@eecs.umich.edu {} 4077303Sgblack@eecs.umich.edu 4087303Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4097279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 4107279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 4117279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 4127279Sgblack@eecs.umich.edu IntRegIndex _index) 4137279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, 4147279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 4157279Sgblack@eecs.umich.edu {} 4167279Sgblack@eecs.umich.edu 4177118Sgblack@eecs.umich.edu std::string 4187118Sgblack@eecs.umich.edu generateDisassembly(Addr pc, const SymbolTable *symtab) const 4197118Sgblack@eecs.umich.edu { 4207118Sgblack@eecs.umich.edu std::stringstream ss; 4217132Sgblack@eecs.umich.edu this->printInst(ss, Memory::AddrMd_PostIndex); 4227118Sgblack@eecs.umich.edu return ss.str(); 4237118Sgblack@eecs.umich.edu } 4247118Sgblack@eecs.umich.edu}; 4256253Sgblack@eecs.umich.edu} 4266253Sgblack@eecs.umich.edu 4276253Sgblack@eecs.umich.edu#endif //__ARCH_ARM_INSTS_MEM_HH__ 428