misc.isa revision 7238:f68fa944baee
12381SN/A// -*- mode:c++ -*- 22592SN/A 32381SN/A// Copyright (c) 2010 ARM Limited 42381SN/A// All rights reserved 52381SN/A// 62381SN/A// The license below extends only to copyright in the software and shall 72381SN/A// not be construed as granting a license to any other intellectual 82381SN/A// property including but not limited to intellectual property relating 92381SN/A// to a hardware implementation of the functionality of the software 102381SN/A// licensed hereunder. You may use the software subject to the license 112381SN/A// terms below provided that you ensure that this notice is replicated 122381SN/A// unmodified and in its entirety in all distributions of the software, 132381SN/A// modified or unmodified, in source code or in binary form. 142381SN/A// 152381SN/A// Redistribution and use in source and binary forms, with or without 162381SN/A// modification, are permitted provided that the following conditions are 172381SN/A// met: redistributions of source code must retain the above copyright 182381SN/A// notice, this list of conditions and the following disclaimer; 192381SN/A// redistributions in binary form must reproduce the above copyright 202381SN/A// notice, this list of conditions and the following disclaimer in the 212381SN/A// documentation and/or other materials provided with the distribution; 222381SN/A// neither the name of the copyright holders nor the names of its 232381SN/A// contributors may be used to endorse or promote products derived from 242381SN/A// this software without specific prior written permission. 252381SN/A// 262381SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 272665Ssaidi@eecs.umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 282665Ssaidi@eecs.umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 292665Ssaidi@eecs.umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 302665Ssaidi@eecs.umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 312381SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 322381SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 332381SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 342381SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 352662Sstever@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 362381SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 372381SN/A// 382381SN/A// Authors: Gabe Black 392381SN/A 402381SN/Adef template MrsDeclare {{ 412392SN/Aclass %(class_name)s : public %(base_class)s 422423SN/A{ 432394SN/A protected: 442812Srdreslin@umich.edu public: 452394SN/A // Constructor 462394SN/A %(class_name)s(ExtMachInst machInst, IntRegIndex _dest); 472394SN/A %(BasicExecDeclare)s 482394SN/A}; 492812Srdreslin@umich.edu}}; 502812Srdreslin@umich.edu 512812Srdreslin@umich.edudef template MrsConstructor {{ 522812Srdreslin@umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 532812Srdreslin@umich.edu IntRegIndex _dest) 542812Srdreslin@umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest) 552813Srdreslin@umich.edu { 562813Srdreslin@umich.edu %(constructor)s; 572813Srdreslin@umich.edu } 582382SN/A}}; 592811Srdreslin@umich.edu 602811Srdreslin@umich.edudef template MsrRegDeclare {{ 612811Srdreslin@umich.educlass %(class_name)s : public %(base_class)s 622811Srdreslin@umich.edu{ 632381SN/A protected: 642662Sstever@eecs.umich.edu public: 652662Sstever@eecs.umich.edu // Constructor 662662Sstever@eecs.umich.edu %(class_name)s(ExtMachInst machInst, IntRegIndex _op1, uint8_t mask); 672662Sstever@eecs.umich.edu %(BasicExecDeclare)s 682662Sstever@eecs.umich.edu}; 692381SN/A}}; 702641Sstever@eecs.umich.edu 712381SN/Adef template MsrRegConstructor {{ 722813Srdreslin@umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 732813Srdreslin@umich.edu IntRegIndex _op1, 742813Srdreslin@umich.edu uint8_t mask) 752813Srdreslin@umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _op1, mask) 762566SN/A { 772662Sstever@eecs.umich.edu %(constructor)s; 782662Sstever@eecs.umich.edu } 792662Sstever@eecs.umich.edu}}; 802662Sstever@eecs.umich.edu 812662Sstever@eecs.umich.edudef template MsrImmDeclare {{ 822566SN/Aclass %(class_name)s : public %(base_class)s 832566SN/A{ 842566SN/A protected: 852662Sstever@eecs.umich.edu public: 862662Sstever@eecs.umich.edu // Constructor 872566SN/A %(class_name)s(ExtMachInst machInst, uint32_t imm, uint8_t mask); 882662Sstever@eecs.umich.edu %(BasicExecDeclare)s 892662Sstever@eecs.umich.edu}; 902566SN/A}}; 912662Sstever@eecs.umich.edu 922662Sstever@eecs.umich.edudef template MsrImmConstructor {{ 932566SN/A inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 942566SN/A uint32_t imm, 952566SN/A uint8_t mask) 962662Sstever@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, imm, mask) 972662Sstever@eecs.umich.edu { 982381SN/A %(constructor)s; 992381SN/A } 1002662Sstever@eecs.umich.edu}}; 1012381SN/A 1022381SN/Adef template RevOpDeclare {{ 1032662Sstever@eecs.umich.educlass %(class_name)s : public %(base_class)s 1042662Sstever@eecs.umich.edu{ 1052662Sstever@eecs.umich.edu protected: 1062662Sstever@eecs.umich.edu public: 1072381SN/A // Constructor 1082381SN/A %(class_name)s(ExtMachInst machInst, 1092662Sstever@eecs.umich.edu IntRegIndex _dest, IntRegIndex _op1); 1102662Sstever@eecs.umich.edu %(BasicExecDeclare)s 1112662Sstever@eecs.umich.edu}; 1122662Sstever@eecs.umich.edu}}; 1132662Sstever@eecs.umich.edu 1142641Sstever@eecs.umich.edudef template RevOpConstructor {{ 1152641Sstever@eecs.umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1162663Sstever@eecs.umich.edu IntRegIndex _dest, IntRegIndex _op1) 1172663Sstever@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _op1) 1182662Sstever@eecs.umich.edu { 1192641Sstever@eecs.umich.edu %(constructor)s; 1202813Srdreslin@umich.edu } 1212641Sstever@eecs.umich.edu}}; 1222641Sstever@eecs.umich.edu 1232641Sstever@eecs.umich.edudef template RegRegRegImmOpDeclare {{ 1242811Srdreslin@umich.educlass %(class_name)s : public %(base_class)s 1252811Srdreslin@umich.edu{ 1262811Srdreslin@umich.edu protected: 1272662Sstever@eecs.umich.edu public: 1282662Sstever@eecs.umich.edu // Constructor 1292623SN/A %(class_name)s(ExtMachInst machInst, 1302623SN/A IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2, 1312662Sstever@eecs.umich.edu uint32_t _imm); 1322641Sstever@eecs.umich.edu %(BasicExecDeclare)s 1332641Sstever@eecs.umich.edu}; 1342662Sstever@eecs.umich.edu}}; 1352662Sstever@eecs.umich.edu 1362662Sstever@eecs.umich.edudef template RegRegRegImmOpConstructor {{ 1372641Sstever@eecs.umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1382641Sstever@eecs.umich.edu IntRegIndex _dest, 1392641Sstever@eecs.umich.edu IntRegIndex _op1, 1402641Sstever@eecs.umich.edu IntRegIndex _op2, 1412641Sstever@eecs.umich.edu uint32_t _imm) 1422662Sstever@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 1432662Sstever@eecs.umich.edu _dest, _op1, _op2, _imm) 1442662Sstever@eecs.umich.edu { 1452662Sstever@eecs.umich.edu %(constructor)s; 1462641Sstever@eecs.umich.edu } 1472662Sstever@eecs.umich.edu}}; 1482662Sstever@eecs.umich.edu 1492662Sstever@eecs.umich.edudef template RegRegRegOpDeclare {{ 1502662Sstever@eecs.umich.educlass %(class_name)s : public %(base_class)s 1512662Sstever@eecs.umich.edu{ 1522662Sstever@eecs.umich.edu protected: 1532662Sstever@eecs.umich.edu public: 1542641Sstever@eecs.umich.edu // Constructor 1552641Sstever@eecs.umich.edu %(class_name)s(ExtMachInst machInst, 1562641Sstever@eecs.umich.edu IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2); 1572641Sstever@eecs.umich.edu %(BasicExecDeclare)s 1582641Sstever@eecs.umich.edu}; 1592662Sstever@eecs.umich.edu}}; 1602662Sstever@eecs.umich.edu 1612662Sstever@eecs.umich.edudef template RegRegRegOpConstructor {{ 1622641Sstever@eecs.umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1632641Sstever@eecs.umich.edu IntRegIndex _dest, 1642641Sstever@eecs.umich.edu IntRegIndex _op1, 1652641Sstever@eecs.umich.edu IntRegIndex _op2) 1662641Sstever@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 1672641Sstever@eecs.umich.edu _dest, _op1, _op2) 1682641Sstever@eecs.umich.edu { 1692641Sstever@eecs.umich.edu %(constructor)s; 1702641Sstever@eecs.umich.edu } 1712641Sstever@eecs.umich.edu}}; 1722641Sstever@eecs.umich.edu 1732641Sstever@eecs.umich.edudef template RegImmRegOpDeclare {{ 1742811Srdreslin@umich.educlass %(class_name)s : public %(base_class)s 1752811Srdreslin@umich.edu{ 1762641Sstever@eecs.umich.edu protected: 1772641Sstever@eecs.umich.edu public: 1782641Sstever@eecs.umich.edu // Constructor 1792641Sstever@eecs.umich.edu %(class_name)s(ExtMachInst machInst, 1802641Sstever@eecs.umich.edu IntRegIndex _dest, uint32_t _imm, IntRegIndex _op1); 1812641Sstever@eecs.umich.edu %(BasicExecDeclare)s 1822813Srdreslin@umich.edu}; 1832641Sstever@eecs.umich.edu}}; 1842641Sstever@eecs.umich.edu 1852641Sstever@eecs.umich.edudef template RegImmRegOpConstructor {{ 1862855Srdreslin@umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 1872855Srdreslin@umich.edu IntRegIndex _dest, 1882811Srdreslin@umich.edu uint32_t _imm, 1892811Srdreslin@umich.edu IntRegIndex _op1) 1902811Srdreslin@umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 1912855Srdreslin@umich.edu _dest, _imm, _op1) 1922855Srdreslin@umich.edu { 1932812Srdreslin@umich.edu %(constructor)s; 1942812Srdreslin@umich.edu } 1952855Srdreslin@umich.edu}}; 1962855Srdreslin@umich.edu 1972855Srdreslin@umich.edudef template RegImmRegShiftOpDeclare {{ 1982855Srdreslin@umich.educlass %(class_name)s : public %(base_class)s 1992641Sstever@eecs.umich.edu{ 2002641Sstever@eecs.umich.edu protected: 2012662Sstever@eecs.umich.edu public: 2022662Sstever@eecs.umich.edu // Constructor 2032641Sstever@eecs.umich.edu %(class_name)s(ExtMachInst machInst, 2042381SN/A IntRegIndex _dest, uint32_t _imm, IntRegIndex _op1, 2052811Srdreslin@umich.edu int32_t _shiftAmt, ArmShiftType _shiftType); 2062811Srdreslin@umich.edu %(BasicExecDeclare)s 2072811Srdreslin@umich.edu}; 2082811Srdreslin@umich.edu}}; 2092811Srdreslin@umich.edu 2102811Srdreslin@umich.edudef template RegImmRegShiftOpConstructor {{ 2112662Sstever@eecs.umich.edu inline %(class_name)s::%(class_name)s(ExtMachInst machInst, 2122381SN/A IntRegIndex _dest, 2132381SN/A uint32_t _imm, 2142641Sstever@eecs.umich.edu IntRegIndex _op1, 2152812Srdreslin@umich.edu int32_t _shiftAmt, 2162641Sstever@eecs.umich.edu ArmShiftType _shiftType) 2172641Sstever@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 2182641Sstever@eecs.umich.edu _dest, _imm, _op1, _shiftAmt, _shiftType) 2192812Srdreslin@umich.edu { 2202812Srdreslin@umich.edu %(constructor)s; 2212813Srdreslin@umich.edu } 2222813Srdreslin@umich.edu}}; 2232814Srdreslin@umich.edu