mem.hh revision 7747
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 667720Sgblack@eecs.umich.educlass MightBeMicro : public PredOp 677720Sgblack@eecs.umich.edu{ 687720Sgblack@eecs.umich.edu protected: 697720Sgblack@eecs.umich.edu MightBeMicro(const char *mnem, ExtMachInst _machInst, OpClass __opClass) 707720Sgblack@eecs.umich.edu : PredOp(mnem, _machInst, __opClass) 717720Sgblack@eecs.umich.edu {} 727720Sgblack@eecs.umich.edu 737720Sgblack@eecs.umich.edu void 747720Sgblack@eecs.umich.edu advancePC(PCState &pcState) const 757720Sgblack@eecs.umich.edu { 767720Sgblack@eecs.umich.edu if (flags[IsLastMicroop]) { 777720Sgblack@eecs.umich.edu pcState.uEnd(); 787720Sgblack@eecs.umich.edu } else if (flags[IsMicroop]) { 797720Sgblack@eecs.umich.edu pcState.uAdvance(); 807720Sgblack@eecs.umich.edu } else { 817720Sgblack@eecs.umich.edu pcState.advance(); 827720Sgblack@eecs.umich.edu } 837720Sgblack@eecs.umich.edu } 847720Sgblack@eecs.umich.edu}; 857720Sgblack@eecs.umich.edu 867291Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 877720Sgblack@eecs.umich.educlass RfeOp : public MightBeMicro 887291Sgblack@eecs.umich.edu{ 897291Sgblack@eecs.umich.edu public: 907291Sgblack@eecs.umich.edu enum AddrMode { 917291Sgblack@eecs.umich.edu DecrementAfter, 927291Sgblack@eecs.umich.edu DecrementBefore, 937291Sgblack@eecs.umich.edu IncrementAfter, 947291Sgblack@eecs.umich.edu IncrementBefore 957291Sgblack@eecs.umich.edu }; 967291Sgblack@eecs.umich.edu protected: 977291Sgblack@eecs.umich.edu IntRegIndex base; 987291Sgblack@eecs.umich.edu AddrMode mode; 997291Sgblack@eecs.umich.edu bool wb; 1007646Sgene.wu@arm.com static const unsigned numMicroops = 2; 1017646Sgene.wu@arm.com 1027646Sgene.wu@arm.com StaticInstPtr *uops; 1037291Sgblack@eecs.umich.edu 1047291Sgblack@eecs.umich.edu RfeOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1057291Sgblack@eecs.umich.edu IntRegIndex _base, AddrMode _mode, bool _wb) 1067720Sgblack@eecs.umich.edu : MightBeMicro(mnem, _machInst, __opClass), 1077646Sgene.wu@arm.com base(_base), mode(_mode), wb(_wb), uops(NULL) 1087291Sgblack@eecs.umich.edu {} 1097291Sgblack@eecs.umich.edu 1107646Sgene.wu@arm.com virtual 1117646Sgene.wu@arm.com ~RfeOp() 1127646Sgene.wu@arm.com { 1137747SAli.Saidi@ARM.com delete [] uops; 1147646Sgene.wu@arm.com } 1157646Sgene.wu@arm.com 1167646Sgene.wu@arm.com StaticInstPtr 1177720Sgblack@eecs.umich.edu fetchMicroop(MicroPC microPC) const 1187646Sgene.wu@arm.com { 1197646Sgene.wu@arm.com assert(uops != NULL && microPC < numMicroops); 1207646Sgene.wu@arm.com return uops[microPC]; 1217646Sgene.wu@arm.com } 1227646Sgene.wu@arm.com 1237291Sgblack@eecs.umich.edu std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; 1247291Sgblack@eecs.umich.edu}; 1257291Sgblack@eecs.umich.edu 1267312Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 1277720Sgblack@eecs.umich.educlass SrsOp : public MightBeMicro 1287312Sgblack@eecs.umich.edu{ 1297312Sgblack@eecs.umich.edu public: 1307312Sgblack@eecs.umich.edu enum AddrMode { 1317312Sgblack@eecs.umich.edu DecrementAfter, 1327312Sgblack@eecs.umich.edu DecrementBefore, 1337312Sgblack@eecs.umich.edu IncrementAfter, 1347312Sgblack@eecs.umich.edu IncrementBefore 1357312Sgblack@eecs.umich.edu }; 1367312Sgblack@eecs.umich.edu protected: 1377312Sgblack@eecs.umich.edu uint32_t regMode; 1387312Sgblack@eecs.umich.edu AddrMode mode; 1397312Sgblack@eecs.umich.edu bool wb; 1407646Sgene.wu@arm.com static const unsigned numMicroops = 2; 1417646Sgene.wu@arm.com 1427646Sgene.wu@arm.com StaticInstPtr *uops; 1437312Sgblack@eecs.umich.edu 1447312Sgblack@eecs.umich.edu SrsOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1457312Sgblack@eecs.umich.edu uint32_t _regMode, AddrMode _mode, bool _wb) 1467720Sgblack@eecs.umich.edu : MightBeMicro(mnem, _machInst, __opClass), 1477646Sgene.wu@arm.com regMode(_regMode), mode(_mode), wb(_wb), uops(NULL) 1487312Sgblack@eecs.umich.edu {} 1497312Sgblack@eecs.umich.edu 1507646Sgene.wu@arm.com virtual 1517646Sgene.wu@arm.com ~SrsOp() 1527646Sgene.wu@arm.com { 1537646Sgene.wu@arm.com delete uops; 1547646Sgene.wu@arm.com } 1557646Sgene.wu@arm.com 1567646Sgene.wu@arm.com StaticInstPtr 1577720Sgblack@eecs.umich.edu fetchMicroop(MicroPC microPC) const 1587646Sgene.wu@arm.com { 1597646Sgene.wu@arm.com assert(uops != NULL && microPC < numMicroops); 1607646Sgene.wu@arm.com return uops[microPC]; 1617646Sgene.wu@arm.com } 1627646Sgene.wu@arm.com 1637312Sgblack@eecs.umich.edu std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; 1647312Sgblack@eecs.umich.edu}; 1657312Sgblack@eecs.umich.edu 1667720Sgblack@eecs.umich.educlass Memory : public MightBeMicro 1677118Sgblack@eecs.umich.edu{ 1687118Sgblack@eecs.umich.edu public: 1697118Sgblack@eecs.umich.edu enum AddrMode { 1707118Sgblack@eecs.umich.edu AddrMd_Offset, 1717118Sgblack@eecs.umich.edu AddrMd_PreIndex, 1727118Sgblack@eecs.umich.edu AddrMd_PostIndex 1737118Sgblack@eecs.umich.edu }; 1747118Sgblack@eecs.umich.edu 1757118Sgblack@eecs.umich.edu protected: 1767118Sgblack@eecs.umich.edu 1777118Sgblack@eecs.umich.edu IntRegIndex dest; 1787118Sgblack@eecs.umich.edu IntRegIndex base; 1797118Sgblack@eecs.umich.edu bool add; 1807646Sgene.wu@arm.com static const unsigned numMicroops = 3; 1817646Sgene.wu@arm.com 1827646Sgene.wu@arm.com StaticInstPtr *uops; 1837118Sgblack@eecs.umich.edu 1847132Sgblack@eecs.umich.edu Memory(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 1857132Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _base, bool _add) 1867720Sgblack@eecs.umich.edu : MightBeMicro(mnem, _machInst, __opClass), 1877646Sgene.wu@arm.com dest(_dest), base(_base), add(_add), uops(NULL) 1887118Sgblack@eecs.umich.edu {} 1897118Sgblack@eecs.umich.edu 1907646Sgene.wu@arm.com virtual 1917646Sgene.wu@arm.com ~Memory() 1927646Sgene.wu@arm.com { 1937646Sgene.wu@arm.com delete [] uops; 1947646Sgene.wu@arm.com } 1957646Sgene.wu@arm.com 1967646Sgene.wu@arm.com StaticInstPtr 1977720Sgblack@eecs.umich.edu fetchMicroop(MicroPC microPC) const 1987646Sgene.wu@arm.com { 1997646Sgene.wu@arm.com assert(uops != NULL && microPC < numMicroops); 2007646Sgene.wu@arm.com return uops[microPC]; 2017646Sgene.wu@arm.com } 2027646Sgene.wu@arm.com 2037118Sgblack@eecs.umich.edu virtual void 2047118Sgblack@eecs.umich.edu printOffset(std::ostream &os) const 2057118Sgblack@eecs.umich.edu {} 2067118Sgblack@eecs.umich.edu 2077279Sgblack@eecs.umich.edu virtual void 2087279Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2097279Sgblack@eecs.umich.edu { 2107279Sgblack@eecs.umich.edu printReg(os, dest); 2117279Sgblack@eecs.umich.edu } 2127279Sgblack@eecs.umich.edu 2137118Sgblack@eecs.umich.edu void printInst(std::ostream &os, AddrMode addrMode) const; 2147118Sgblack@eecs.umich.edu}; 2157118Sgblack@eecs.umich.edu 2167118Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 2177132Sgblack@eecs.umich.educlass MemoryImm : public Memory 2187118Sgblack@eecs.umich.edu{ 2197118Sgblack@eecs.umich.edu protected: 2207118Sgblack@eecs.umich.edu int32_t imm; 2217118Sgblack@eecs.umich.edu 2227132Sgblack@eecs.umich.edu MemoryImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2237132Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _base, bool _add, int32_t _imm) 2247132Sgblack@eecs.umich.edu : Memory(mnem, _machInst, __opClass, _dest, _base, _add), imm(_imm) 2257118Sgblack@eecs.umich.edu {} 2267118Sgblack@eecs.umich.edu 2277118Sgblack@eecs.umich.edu void 2287118Sgblack@eecs.umich.edu printOffset(std::ostream &os) const 2297118Sgblack@eecs.umich.edu { 2307118Sgblack@eecs.umich.edu int32_t pImm = imm; 2317118Sgblack@eecs.umich.edu if (!add) 2327118Sgblack@eecs.umich.edu pImm = -pImm; 2337118Sgblack@eecs.umich.edu ccprintf(os, "#%d", pImm); 2347118Sgblack@eecs.umich.edu } 2357118Sgblack@eecs.umich.edu}; 2367118Sgblack@eecs.umich.edu 2377303Sgblack@eecs.umich.educlass MemoryExImm : public MemoryImm 2387303Sgblack@eecs.umich.edu{ 2397303Sgblack@eecs.umich.edu protected: 2407303Sgblack@eecs.umich.edu IntRegIndex result; 2417303Sgblack@eecs.umich.edu 2427303Sgblack@eecs.umich.edu MemoryExImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2437303Sgblack@eecs.umich.edu IntRegIndex _result, IntRegIndex _dest, IntRegIndex _base, 2447303Sgblack@eecs.umich.edu bool _add, int32_t _imm) 2457303Sgblack@eecs.umich.edu : MemoryImm(mnem, _machInst, __opClass, _dest, _base, _add, _imm), 2467303Sgblack@eecs.umich.edu result(_result) 2477303Sgblack@eecs.umich.edu {} 2487303Sgblack@eecs.umich.edu 2497303Sgblack@eecs.umich.edu void 2507303Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2517303Sgblack@eecs.umich.edu { 2527303Sgblack@eecs.umich.edu printReg(os, result); 2537303Sgblack@eecs.umich.edu os << ", "; 2547303Sgblack@eecs.umich.edu MemoryImm::printDest(os); 2557303Sgblack@eecs.umich.edu } 2567303Sgblack@eecs.umich.edu}; 2577303Sgblack@eecs.umich.edu 2587279Sgblack@eecs.umich.edu// The address is a base register plus an immediate. 2597279Sgblack@eecs.umich.educlass MemoryDImm : public MemoryImm 2607279Sgblack@eecs.umich.edu{ 2617279Sgblack@eecs.umich.edu protected: 2627279Sgblack@eecs.umich.edu IntRegIndex dest2; 2637279Sgblack@eecs.umich.edu 2647279Sgblack@eecs.umich.edu MemoryDImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2657279Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 2667279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 2677279Sgblack@eecs.umich.edu : MemoryImm(mnem, _machInst, __opClass, _dest, _base, _add, _imm), 2687279Sgblack@eecs.umich.edu dest2(_dest2) 2697279Sgblack@eecs.umich.edu {} 2707279Sgblack@eecs.umich.edu 2717279Sgblack@eecs.umich.edu void 2727279Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2737279Sgblack@eecs.umich.edu { 2747279Sgblack@eecs.umich.edu MemoryImm::printDest(os); 2757279Sgblack@eecs.umich.edu os << ", "; 2767279Sgblack@eecs.umich.edu printReg(os, dest2); 2777279Sgblack@eecs.umich.edu } 2787279Sgblack@eecs.umich.edu}; 2797279Sgblack@eecs.umich.edu 2807303Sgblack@eecs.umich.educlass MemoryExDImm : public MemoryDImm 2817303Sgblack@eecs.umich.edu{ 2827303Sgblack@eecs.umich.edu protected: 2837303Sgblack@eecs.umich.edu IntRegIndex result; 2847303Sgblack@eecs.umich.edu 2857303Sgblack@eecs.umich.edu MemoryExDImm(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 2867303Sgblack@eecs.umich.edu IntRegIndex _result, IntRegIndex _dest, IntRegIndex _dest2, 2877303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 2887303Sgblack@eecs.umich.edu : MemoryDImm(mnem, _machInst, __opClass, _dest, _dest2, 2897303Sgblack@eecs.umich.edu _base, _add, _imm), result(_result) 2907303Sgblack@eecs.umich.edu {} 2917303Sgblack@eecs.umich.edu 2927303Sgblack@eecs.umich.edu void 2937303Sgblack@eecs.umich.edu printDest(std::ostream &os) const 2947303Sgblack@eecs.umich.edu { 2957303Sgblack@eecs.umich.edu printReg(os, result); 2967303Sgblack@eecs.umich.edu os << ", "; 2977303Sgblack@eecs.umich.edu MemoryDImm::printDest(os); 2987303Sgblack@eecs.umich.edu } 2997303Sgblack@eecs.umich.edu}; 3007303Sgblack@eecs.umich.edu 3017118Sgblack@eecs.umich.edu// The address is a shifted register plus an immediate 3027132Sgblack@eecs.umich.educlass MemoryReg : public Memory 3037118Sgblack@eecs.umich.edu{ 3047118Sgblack@eecs.umich.edu protected: 3057118Sgblack@eecs.umich.edu int32_t shiftAmt; 3067118Sgblack@eecs.umich.edu ArmShiftType shiftType; 3077118Sgblack@eecs.umich.edu IntRegIndex index; 3087118Sgblack@eecs.umich.edu 3097132Sgblack@eecs.umich.edu MemoryReg(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 3107132Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _base, bool _add, 3117132Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 3127132Sgblack@eecs.umich.edu IntRegIndex _index) 3137132Sgblack@eecs.umich.edu : Memory(mnem, _machInst, __opClass, _dest, _base, _add), 3147118Sgblack@eecs.umich.edu shiftAmt(_shiftAmt), shiftType(_shiftType), index(_index) 3157118Sgblack@eecs.umich.edu {} 3167118Sgblack@eecs.umich.edu 3177428Sgblack@eecs.umich.edu void printOffset(std::ostream &os) const; 3187118Sgblack@eecs.umich.edu}; 3197118Sgblack@eecs.umich.edu 3207279Sgblack@eecs.umich.educlass MemoryDReg : public MemoryReg 3217279Sgblack@eecs.umich.edu{ 3227279Sgblack@eecs.umich.edu protected: 3237279Sgblack@eecs.umich.edu IntRegIndex dest2; 3247279Sgblack@eecs.umich.edu 3257279Sgblack@eecs.umich.edu MemoryDReg(const char *mnem, ExtMachInst _machInst, OpClass __opClass, 3267279Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 3277279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 3287279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 3297279Sgblack@eecs.umich.edu IntRegIndex _index) 3307279Sgblack@eecs.umich.edu : MemoryReg(mnem, _machInst, __opClass, _dest, _base, _add, 3317279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index), 3327279Sgblack@eecs.umich.edu dest2(_dest2) 3337279Sgblack@eecs.umich.edu {} 3347279Sgblack@eecs.umich.edu 3357279Sgblack@eecs.umich.edu void 3367279Sgblack@eecs.umich.edu printDest(std::ostream &os) const 3377279Sgblack@eecs.umich.edu { 3387279Sgblack@eecs.umich.edu MemoryReg::printDest(os); 3397279Sgblack@eecs.umich.edu os << ", "; 3407279Sgblack@eecs.umich.edu printReg(os, dest2); 3417279Sgblack@eecs.umich.edu } 3427279Sgblack@eecs.umich.edu}; 3437279Sgblack@eecs.umich.edu 3447118Sgblack@eecs.umich.edutemplate<class Base> 3457132Sgblack@eecs.umich.educlass MemoryOffset : public Base 3467118Sgblack@eecs.umich.edu{ 3477118Sgblack@eecs.umich.edu protected: 3487132Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3497132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 3507132Sgblack@eecs.umich.edu bool _add, int32_t _imm) 3517132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm) 3527132Sgblack@eecs.umich.edu {} 3537132Sgblack@eecs.umich.edu 3547132Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3557132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 3567132Sgblack@eecs.umich.edu bool _add, int32_t _shiftAmt, ArmShiftType _shiftType, 3577132Sgblack@eecs.umich.edu IntRegIndex _index) 3587132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, 3597132Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 3607132Sgblack@eecs.umich.edu {} 3617132Sgblack@eecs.umich.edu 3627279Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3637279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 3647279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 3657279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, _imm) 3667279Sgblack@eecs.umich.edu {} 3677279Sgblack@eecs.umich.edu 3687279Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3697303Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _result, 3707303Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 3717303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 3727303Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _result, 3737303Sgblack@eecs.umich.edu _dest, _dest2, _base, _add, _imm) 3747303Sgblack@eecs.umich.edu {} 3757303Sgblack@eecs.umich.edu 3767303Sgblack@eecs.umich.edu MemoryOffset(const char *mnem, ExtMachInst _machInst, 3777279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 3787279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 3797279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 3807279Sgblack@eecs.umich.edu IntRegIndex _index) 3817279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, 3827279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 3837279Sgblack@eecs.umich.edu {} 3847279Sgblack@eecs.umich.edu 3857132Sgblack@eecs.umich.edu std::string 3867132Sgblack@eecs.umich.edu generateDisassembly(Addr pc, const SymbolTable *symtab) const 3877132Sgblack@eecs.umich.edu { 3887132Sgblack@eecs.umich.edu std::stringstream ss; 3897132Sgblack@eecs.umich.edu this->printInst(ss, Memory::AddrMd_Offset); 3907132Sgblack@eecs.umich.edu return ss.str(); 3917132Sgblack@eecs.umich.edu } 3927132Sgblack@eecs.umich.edu}; 3937132Sgblack@eecs.umich.edu 3947132Sgblack@eecs.umich.edutemplate<class Base> 3957132Sgblack@eecs.umich.educlass MemoryPreIndex : public Base 3967132Sgblack@eecs.umich.edu{ 3977132Sgblack@eecs.umich.edu protected: 3987132Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 3997132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 4007132Sgblack@eecs.umich.edu bool _add, int32_t _imm) 4017132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm) 4027132Sgblack@eecs.umich.edu {} 4037132Sgblack@eecs.umich.edu 4047132Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 4057132Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 4067132Sgblack@eecs.umich.edu bool _add, int32_t _shiftAmt, ArmShiftType _shiftType, 4077132Sgblack@eecs.umich.edu IntRegIndex _index) 4087132Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, 4097132Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 4107132Sgblack@eecs.umich.edu {} 4117132Sgblack@eecs.umich.edu 4127279Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 4137279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 4147279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 4157279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, _imm) 4167279Sgblack@eecs.umich.edu {} 4177279Sgblack@eecs.umich.edu 4187279Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 4197303Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _result, 4207303Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 4217303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 4227303Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _result, 4237303Sgblack@eecs.umich.edu _dest, _dest2, _base, _add, _imm) 4247303Sgblack@eecs.umich.edu {} 4257303Sgblack@eecs.umich.edu 4267303Sgblack@eecs.umich.edu MemoryPreIndex(const char *mnem, ExtMachInst _machInst, 4277279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 4287279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 4297279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 4307279Sgblack@eecs.umich.edu IntRegIndex _index) 4317279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, 4327279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 4337279Sgblack@eecs.umich.edu {} 4347279Sgblack@eecs.umich.edu 4357132Sgblack@eecs.umich.edu std::string 4367132Sgblack@eecs.umich.edu generateDisassembly(Addr pc, const SymbolTable *symtab) const 4377132Sgblack@eecs.umich.edu { 4387132Sgblack@eecs.umich.edu std::stringstream ss; 4397132Sgblack@eecs.umich.edu this->printInst(ss, Memory::AddrMd_PreIndex); 4407132Sgblack@eecs.umich.edu return ss.str(); 4417132Sgblack@eecs.umich.edu } 4427132Sgblack@eecs.umich.edu}; 4437132Sgblack@eecs.umich.edu 4447132Sgblack@eecs.umich.edutemplate<class Base> 4457132Sgblack@eecs.umich.educlass MemoryPostIndex : public Base 4467132Sgblack@eecs.umich.edu{ 4477132Sgblack@eecs.umich.edu protected: 4487132Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4497118Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 4507118Sgblack@eecs.umich.edu bool _add, int32_t _imm) 4517118Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, _imm) 4527118Sgblack@eecs.umich.edu {} 4537118Sgblack@eecs.umich.edu 4547132Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4557118Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _base, 4567118Sgblack@eecs.umich.edu bool _add, int32_t _shiftAmt, ArmShiftType _shiftType, 4577118Sgblack@eecs.umich.edu IntRegIndex _index) 4587118Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _base, _add, 4597118Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 4607118Sgblack@eecs.umich.edu {} 4617118Sgblack@eecs.umich.edu 4627279Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4637279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 4647279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 4657279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, _imm) 4667279Sgblack@eecs.umich.edu {} 4677279Sgblack@eecs.umich.edu 4687279Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4697303Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _result, 4707303Sgblack@eecs.umich.edu IntRegIndex _dest, IntRegIndex _dest2, 4717303Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, int32_t _imm) 4727303Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _result, 4737303Sgblack@eecs.umich.edu _dest, _dest2, _base, _add, _imm) 4747303Sgblack@eecs.umich.edu {} 4757303Sgblack@eecs.umich.edu 4767303Sgblack@eecs.umich.edu MemoryPostIndex(const char *mnem, ExtMachInst _machInst, 4777279Sgblack@eecs.umich.edu OpClass __opClass, IntRegIndex _dest, IntRegIndex _dest2, 4787279Sgblack@eecs.umich.edu IntRegIndex _base, bool _add, 4797279Sgblack@eecs.umich.edu int32_t _shiftAmt, ArmShiftType _shiftType, 4807279Sgblack@eecs.umich.edu IntRegIndex _index) 4817279Sgblack@eecs.umich.edu : Base(mnem, _machInst, __opClass, _dest, _dest2, _base, _add, 4827279Sgblack@eecs.umich.edu _shiftAmt, _shiftType, _index) 4837279Sgblack@eecs.umich.edu {} 4847279Sgblack@eecs.umich.edu 4857118Sgblack@eecs.umich.edu std::string 4867118Sgblack@eecs.umich.edu generateDisassembly(Addr pc, const SymbolTable *symtab) const 4877118Sgblack@eecs.umich.edu { 4887118Sgblack@eecs.umich.edu std::stringstream ss; 4897132Sgblack@eecs.umich.edu this->printInst(ss, Memory::AddrMd_PostIndex); 4907118Sgblack@eecs.umich.edu return ss.str(); 4917118Sgblack@eecs.umich.edu } 4927118Sgblack@eecs.umich.edu}; 4936253Sgblack@eecs.umich.edu} 4946253Sgblack@eecs.umich.edu 4956253Sgblack@eecs.umich.edu#endif //__ARCH_ARM_INSTS_MEM_HH__ 496