misc.isa revision 7331
12810SN/A// -*- mode:c++ -*- 29614Srene.dejong@arm.com 38856Sandreas.hansson@arm.com// Copyright (c) 2010 ARM Limited 48856Sandreas.hansson@arm.com// All rights reserved 58856Sandreas.hansson@arm.com// 68856Sandreas.hansson@arm.com// The license below extends only to copyright in the software and shall 78856Sandreas.hansson@arm.com// not be construed as granting a license to any other intellectual 88856Sandreas.hansson@arm.com// property including but not limited to intellectual property relating 98856Sandreas.hansson@arm.com// to a hardware implementation of the functionality of the software 108856Sandreas.hansson@arm.com// licensed hereunder. You may use the software subject to the license 118856Sandreas.hansson@arm.com// terms below provided that you ensure that this notice is replicated 128856Sandreas.hansson@arm.com// unmodified and in its entirety in all distributions of the software, 138856Sandreas.hansson@arm.com// modified or unmodified, in source code or in binary form. 142810SN/A// 152810SN/A// Redistribution and use in source and binary forms, with or without 162810SN/A// modification, are permitted provided that the following conditions are 172810SN/A// met: redistributions of source code must retain the above copyright 182810SN/A// notice, this list of conditions and the following disclaimer; 192810SN/A// redistributions in binary form must reproduce the above copyright 202810SN/A// notice, this list of conditions and the following disclaimer in the 212810SN/A// documentation and/or other materials provided with the distribution; 222810SN/A// neither the name of the copyright holders nor the names of its 232810SN/A// contributors may be used to endorse or promote products derived from 242810SN/A// this software without specific prior written permission. 252810SN/A// 262810SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 272810SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 282810SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 292810SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 302810SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 312810SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 322810SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 332810SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 342810SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 352810SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 362810SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 372810SN/A// 382810SN/A// Authors: Gabe Black 392810SN/A 402810SN/Adef template MrsDeclare {{ 412810SN/Aclass %(class_name)s : public %(base_class)s 422810SN/A{ 432810SN/A protected: 442810SN/A public: 452810SN/A // Constructor 462810SN/A %(class_name)s(ExtMachInst machInst, IntRegIndex _dest); 472810SN/A %(BasicExecDeclare)s 4811486Snikos.nikoleris@arm.com}; 4911486Snikos.nikoleris@arm.com}}; 508232Snate@binkert.org 519152Satgutier@umich.edudef template MrsConstructor {{ 5211486Snikos.nikoleris@arm.com inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 5311486Snikos.nikoleris@arm.com IntRegIndex _dest) 549795Sandreas.hansson@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest) 559795Sandreas.hansson@arm.com { 5610263Satgutier@umich.edu %(constructor)s; 578786Sgblack@eecs.umich.edu } 582810SN/A}}; 592810SN/A 602810SN/Adef template MsrRegDeclare {{ 618856Sandreas.hansson@arm.comclass %(class_name)s : public %(base_class)s 628856Sandreas.hansson@arm.com{ 638856Sandreas.hansson@arm.com protected: 648922Swilliam.wang@arm.com public: 658914Sandreas.hansson@arm.com // Constructor 668856Sandreas.hansson@arm.com %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, uint8_t mask); 678856Sandreas.hansson@arm.com %(BasicExecDeclare)s 684475SN/A}; 6911053Sandreas.hansson@arm.com}}; 705034SN/A 7110360Sandreas.hansson@arm.comdef template MsrRegConstructor {{ 7211377Sandreas.hansson@arm.com inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 7311377Sandreas.hansson@arm.com IntRegIndex _op1, 7411053Sandreas.hansson@arm.com uint8_t mask) 7510693SMarco.Balboni@ARM.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, mask) 7610693SMarco.Balboni@ARM.com { 7710693SMarco.Balboni@ARM.com %(constructor)s; 789263Smrinmoy.ghosh@arm.com } 795034SN/A}}; 8011331Sandreas.hansson@arm.com 8110884Sandreas.hansson@arm.comdef template MsrImmDeclare {{ 824626SN/Aclass %(class_name)s : public %(base_class)s 8310360Sandreas.hansson@arm.com{ 8411484Snikos.nikoleris@arm.com protected: 855034SN/A public: 868883SAli.Saidi@ARM.com // Constructor 878833Sdam.sunwoo@arm.com %(class_name)s(ExtMachInst machInst, uint32_t imm, uint8_t mask); 884458SN/A %(BasicExecDeclare)s 8911377Sandreas.hansson@arm.com}; 9011377Sandreas.hansson@arm.com}}; 9111377Sandreas.hansson@arm.com 9211377Sandreas.hansson@arm.comdef template MsrImmConstructor {{ 9311377Sandreas.hansson@arm.com inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 9411377Sandreas.hansson@arm.com uint32_t imm, 9511331Sandreas.hansson@arm.com uint8_t mask) 9611331Sandreas.hansson@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, imm, mask) 972810SN/A { 982810SN/A %(constructor)s; 993013SN/A } 1008856Sandreas.hansson@arm.com}}; 1012810SN/A 1023013SN/Adef template ImmOpDeclare {{ 10310714Sandreas.hansson@arm.comclass %(class_name)s : public %(base_class)s 1042810SN/A{ 1059614Srene.dejong@arm.com protected: 1069614Srene.dejong@arm.com public: 1079614Srene.dejong@arm.com // Constructor 10810345SCurtis.Dunham@arm.com %(class_name)s(ExtMachInst machInst, uint64_t _imm); 10910714Sandreas.hansson@arm.com %(BasicExecDeclare)s 11010345SCurtis.Dunham@arm.com}; 1119614Srene.dejong@arm.com}}; 1122810SN/A 1132810SN/Adef template ImmOpConstructor {{ 1142810SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, uint64_t _imm) 1158856Sandreas.hansson@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _imm) 1162810SN/A { 1173013SN/A %(constructor)s; 11810714Sandreas.hansson@arm.com } 1193013SN/A}}; 1208856Sandreas.hansson@arm.com 12110714Sandreas.hansson@arm.comdef template RegRegOpDeclare {{ 1228922Swilliam.wang@arm.comclass %(class_name)s : public %(base_class)s 1232897SN/A{ 1242810SN/A protected: 1252810SN/A public: 12610344Sandreas.hansson@arm.com // Constructor 12710344Sandreas.hansson@arm.com %(class_name)s(ExtMachInst machInst, 12810344Sandreas.hansson@arm.com IntRegIndex _dest, IntRegIndex _op1); 12910714Sandreas.hansson@arm.com %(BasicExecDeclare)s 13010344Sandreas.hansson@arm.com}; 13110344Sandreas.hansson@arm.com}}; 13210344Sandreas.hansson@arm.com 13310713Sandreas.hansson@arm.comdef template RegRegOpConstructor {{ 13410344Sandreas.hansson@arm.com inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1352844SN/A IntRegIndex _dest, IntRegIndex _op1) 1362810SN/A : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1) 1372858SN/A { 1382858SN/A %(constructor)s; 1398856Sandreas.hansson@arm.com } 1408922Swilliam.wang@arm.com}}; 1418711Sandreas.hansson@arm.com 14211331Sandreas.hansson@arm.comdef template RegRegRegImmOpDeclare {{ 1432858SN/Aclass %(class_name)s : public %(base_class)s 1442858SN/A{ 1459294Sandreas.hansson@arm.com protected: 1469294Sandreas.hansson@arm.com public: 1478922Swilliam.wang@arm.com // Constructor 1488922Swilliam.wang@arm.com %(class_name)s(ExtMachInst machInst, 1498922Swilliam.wang@arm.com IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, 1508922Swilliam.wang@arm.com uint64_t _imm); 1518922Swilliam.wang@arm.com %(BasicExecDeclare)s 1528922Swilliam.wang@arm.com}; 1538922Swilliam.wang@arm.com}}; 1548922Swilliam.wang@arm.com 1559294Sandreas.hansson@arm.comdef template RegRegRegImmOpConstructor {{ 1569294Sandreas.hansson@arm.com inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1578922Swilliam.wang@arm.com IntRegIndex _dest, 1588922Swilliam.wang@arm.com IntRegIndex _op1, 1598922Swilliam.wang@arm.com IntRegIndex _op2, 1608922Swilliam.wang@arm.com uint64_t _imm) 1618922Swilliam.wang@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 1628922Swilliam.wang@arm.com _dest, _op1, _op2, _imm) 1638922Swilliam.wang@arm.com { 1644628SN/A %(constructor)s; 16510821Sandreas.hansson@arm.com } 16610821Sandreas.hansson@arm.com}}; 16710821Sandreas.hansson@arm.com 16810821Sandreas.hansson@arm.comdef template RegRegRegRegOpDeclare {{ 16910821Sandreas.hansson@arm.comclass %(class_name)s : public %(base_class)s 17010821Sandreas.hansson@arm.com{ 17110821Sandreas.hansson@arm.com protected: 17210821Sandreas.hansson@arm.com public: 17310821Sandreas.hansson@arm.com // Constructor 17410821Sandreas.hansson@arm.com %(class_name)s(ExtMachInst machInst, 17510821Sandreas.hansson@arm.com IntRegIndex _dest, IntRegIndex _op1, 1762858SN/A IntRegIndex _op2, IntRegIndex _op3); 1772810SN/A %(BasicExecDeclare)s 1782810SN/A}; 1792810SN/A}}; 1802810SN/A 1812810SN/Adef template RegRegRegRegOpConstructor {{ 1824022SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1834022SN/A IntRegIndex _dest, 1844022SN/A IntRegIndex _op1, 1852810SN/A IntRegIndex _op2, 1862810SN/A IntRegIndex _op3) 1878833Sdam.sunwoo@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 1882810SN/A _dest, _op1, _op2, _op3) 1892810SN/A { 1902810SN/A %(constructor)s; 1912810SN/A } 1928833Sdam.sunwoo@arm.com}}; 1938833Sdam.sunwoo@arm.com 1948833Sdam.sunwoo@arm.comdef template RegRegRegOpDeclare {{ 1952810SN/Aclass %(class_name)s : public %(base_class)s 1962810SN/A{ 1974871SN/A protected: 1984871SN/A public: 1994871SN/A // Constructor 2004871SN/A %(class_name)s(ExtMachInst machInst, 20111455Sandreas.hansson@arm.com IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2); 20210885Sandreas.hansson@arm.com %(BasicExecDeclare)s 2034871SN/A}; 2044871SN/A}}; 2054871SN/A 2064871SN/Adef template RegRegRegOpConstructor {{ 2074871SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 2082810SN/A IntRegIndex _dest, 2092810SN/A IntRegIndex _op1, 2102810SN/A IntRegIndex _op2) 2118833Sdam.sunwoo@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 2122810SN/A _dest, _op1, _op2) 2134871SN/A { 2148833Sdam.sunwoo@arm.com %(constructor)s; 2158833Sdam.sunwoo@arm.com } 2168833Sdam.sunwoo@arm.com}}; 2172810SN/A 2182810SN/Adef template RegRegImmOpDeclare {{ 2192810SN/Aclass %(class_name)s : public %(base_class)s 2202810SN/A{ 2218833Sdam.sunwoo@arm.com protected: 2222810SN/A public: 2234871SN/A // Constructor 2248833Sdam.sunwoo@arm.com %(class_name)s(ExtMachInst machInst, 2258833Sdam.sunwoo@arm.com IntRegIndex _dest, IntRegIndex _op1, 2268833Sdam.sunwoo@arm.com uint64_t _imm); 2272810SN/A %(BasicExecDeclare)s 2282810SN/A}; 2294022SN/A}}; 2304022SN/A 2314022SN/Adef template RegRegImmOpConstructor {{ 2322810SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 2332810SN/A IntRegIndex _dest, 2348833Sdam.sunwoo@arm.com IntRegIndex _op1, 2352810SN/A uint64_t _imm) 2362810SN/A : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 2372810SN/A _dest, _op1, _imm) 2382810SN/A { 2398833Sdam.sunwoo@arm.com %(constructor)s; 2408833Sdam.sunwoo@arm.com } 2418833Sdam.sunwoo@arm.com}}; 2422810SN/A 2432810SN/Adef template RegRegImmImmOpDeclare {{ 2442810SN/Aclass %(class_name)s : public %(base_class)s 2452810SN/A{ 2462810SN/A protected: 2478833Sdam.sunwoo@arm.com public: 2482810SN/A // Constructor 2494871SN/A %(class_name)s(ExtMachInst machInst, 2508833Sdam.sunwoo@arm.com IntRegIndex _dest, IntRegIndex _op1, 2518833Sdam.sunwoo@arm.com uint64_t _imm1, uint64_t _imm2); 2528833Sdam.sunwoo@arm.com %(BasicExecDeclare)s 2532810SN/A}; 2542810SN/A}}; 2552810SN/A 2562810SN/Adef template RegRegImmImmOpConstructor {{ 2578833Sdam.sunwoo@arm.com inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 2582810SN/A IntRegIndex _dest, 2594871SN/A IntRegIndex _op1, 2608833Sdam.sunwoo@arm.com uint64_t _imm1, 2618833Sdam.sunwoo@arm.com uint64_t _imm2) 2628833Sdam.sunwoo@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 2632810SN/A _dest, _op1, _imm1, _imm2) 2642810SN/A { 2654022SN/A %(constructor)s; 2664022SN/A } 2674022SN/A}}; 2682810SN/A 2692810SN/Adef template RegImmRegOpDeclare {{ 2708833Sdam.sunwoo@arm.comclass %(class_name)s : public %(base_class)s 2712810SN/A{ 2722810SN/A protected: 2732810SN/A public: 2742810SN/A // Constructor 2758833Sdam.sunwoo@arm.com %(class_name)s(ExtMachInst machInst, 2768833Sdam.sunwoo@arm.com IntRegIndex _dest, uint64_t _imm, IntRegIndex _op1); 2778833Sdam.sunwoo@arm.com %(BasicExecDeclare)s 2782810SN/A}; 2792810SN/A}}; 2802810SN/A 2812810SN/Adef template RegImmRegOpConstructor {{ 2822810SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 2838833Sdam.sunwoo@arm.com IntRegIndex _dest, 2842810SN/A uint64_t _imm, 2854871SN/A IntRegIndex _op1) 2868833Sdam.sunwoo@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 2878833Sdam.sunwoo@arm.com _dest, _imm, _op1) 2888833Sdam.sunwoo@arm.com { 2892810SN/A %(constructor)s; 2902810SN/A } 2912810SN/A}}; 2922810SN/A 2938833Sdam.sunwoo@arm.comdef template RegImmRegShiftOpDeclare {{ 2942810SN/Aclass %(class_name)s : public %(base_class)s 2954871SN/A{ 2968833Sdam.sunwoo@arm.com protected: 2978833Sdam.sunwoo@arm.com public: 2988833Sdam.sunwoo@arm.com // Constructor 2992810SN/A %(class_name)s(ExtMachInst machInst, 3002810SN/A IntRegIndex _dest, uint64_t _imm, IntRegIndex _op1, 3014022SN/A int32_t _shiftAmt, ArmShiftType _shiftType); 3024022SN/A %(BasicExecDeclare)s 3034022SN/A}; 3042810SN/A}}; 3052810SN/A 3062810SN/Adef template RegImmRegShiftOpConstructor {{ 3072810SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 3082810SN/A IntRegIndex _dest, 3092810SN/A uint64_t _imm, 3108833Sdam.sunwoo@arm.com IntRegIndex _op1, 3112810SN/A int32_t _shiftAmt, 3128833Sdam.sunwoo@arm.com ArmShiftType _shiftType) 3138833Sdam.sunwoo@arm.com : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 3148833Sdam.sunwoo@arm.com _dest, _imm, _op1, _shiftAmt, _shiftType) 3152810SN/A { 3162810SN/A %(constructor)s; 3172810SN/A } 3182810SN/A}}; 3192810SN/A