macromem.isa revision 7170
16019SN/A// -*- mode:c++ -*- 26019SN/A 37134Sgblack@eecs.umich.edu// Copyright (c) 2010 ARM Limited 47134Sgblack@eecs.umich.edu// All rights reserved 57134Sgblack@eecs.umich.edu// 67134Sgblack@eecs.umich.edu// The license below extends only to copyright in the software and shall 77134Sgblack@eecs.umich.edu// not be construed as granting a license to any other intellectual 87134Sgblack@eecs.umich.edu// property including but not limited to intellectual property relating 97134Sgblack@eecs.umich.edu// to a hardware implementation of the functionality of the software 107134Sgblack@eecs.umich.edu// licensed hereunder. You may use the software subject to the license 117134Sgblack@eecs.umich.edu// terms below provided that you ensure that this notice is replicated 127134Sgblack@eecs.umich.edu// unmodified and in its entirety in all distributions of the software, 137134Sgblack@eecs.umich.edu// modified or unmodified, in source code or in binary form. 147134Sgblack@eecs.umich.edu// 156019SN/A// Copyright (c) 2007-2008 The Florida State University 166019SN/A// All rights reserved. 176019SN/A// 186019SN/A// Redistribution and use in source and binary forms, with or without 196019SN/A// modification, are permitted provided that the following conditions are 206019SN/A// met: redistributions of source code must retain the above copyright 216019SN/A// notice, this list of conditions and the following disclaimer; 226019SN/A// redistributions in binary form must reproduce the above copyright 236019SN/A// notice, this list of conditions and the following disclaimer in the 246019SN/A// documentation and/or other materials provided with the distribution; 256019SN/A// neither the name of the copyright holders nor the names of its 266019SN/A// contributors may be used to endorse or promote products derived from 276019SN/A// this software without specific prior written permission. 286019SN/A// 296019SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 306019SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 316019SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 326019SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 336019SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 346019SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 356019SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 366019SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 376019SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 386019SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 396019SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 406019SN/A// 416019SN/A// Authors: Stephen Hines 426308SN/A// Gabe Black 436308SN/A 446309SN/A//////////////////////////////////////////////////////////////////// 456309SN/A// 466309SN/A// Load/store microops 476309SN/A// 486309SN/A 496309SN/Adef template MicroMemDeclare {{ 506309SN/A class %(class_name)s : public %(base_class)s 516309SN/A { 526309SN/A public: 536309SN/A %(class_name)s(ExtMachInst machInst, 547134Sgblack@eecs.umich.edu RegIndex _ura, RegIndex _urb, bool _up, 556309SN/A uint8_t _imm); 566309SN/A %(BasicExecDeclare)s 576309SN/A %(InitiateAccDeclare)s 586309SN/A %(CompleteAccDeclare)s 596309SN/A }; 606309SN/A}}; 616309SN/A 627134Sgblack@eecs.umich.edudef template MicroMemConstructor {{ 637170Sgblack@eecs.umich.edu %(class_name)s::%(class_name)s(ExtMachInst machInst, 647170Sgblack@eecs.umich.edu RegIndex _ura, 657170Sgblack@eecs.umich.edu RegIndex _urb, 667170Sgblack@eecs.umich.edu bool _up, 677170Sgblack@eecs.umich.edu uint8_t _imm) 687134Sgblack@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 697134Sgblack@eecs.umich.edu _ura, _urb, _up, _imm) 707134Sgblack@eecs.umich.edu { 717134Sgblack@eecs.umich.edu %(constructor)s; 727134Sgblack@eecs.umich.edu } 736309SN/A}}; 746308SN/A 756308SN/A//////////////////////////////////////////////////////////////////// 766308SN/A// 776308SN/A// Integer = Integer op Immediate microops 786308SN/A// 796308SN/A 806308SN/Adef template MicroIntDeclare {{ 816308SN/A class %(class_name)s : public %(base_class)s 826308SN/A { 836308SN/A public: 846308SN/A %(class_name)s(ExtMachInst machInst, 856308SN/A RegIndex _ura, RegIndex _urb, 866308SN/A uint8_t _imm); 876308SN/A %(BasicExecDeclare)s 886308SN/A }; 896308SN/A}}; 906308SN/A 917134Sgblack@eecs.umich.edudef template MicroIntConstructor {{ 927170Sgblack@eecs.umich.edu %(class_name)s::%(class_name)s(ExtMachInst machInst, 937170Sgblack@eecs.umich.edu RegIndex _ura, 947170Sgblack@eecs.umich.edu RegIndex _urb, 957170Sgblack@eecs.umich.edu uint8_t _imm) 967134Sgblack@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 977134Sgblack@eecs.umich.edu _ura, _urb, _imm) 987134Sgblack@eecs.umich.edu { 997134Sgblack@eecs.umich.edu %(constructor)s; 1007134Sgblack@eecs.umich.edu } 1016308SN/A}}; 1026019SN/A 1036019SN/A//////////////////////////////////////////////////////////////////// 1046019SN/A// 1056019SN/A// Macro Memory-format instructions 1066019SN/A// 1076019SN/A 1087134Sgblack@eecs.umich.edudef template MacroMemDeclare {{ 1096253SN/A/** 1106253SN/A * Static instructions class for a store multiple instruction 1116253SN/A */ 1126253SN/Aclass %(class_name)s : public %(base_class)s 1136253SN/A{ 1146253SN/A public: 1156253SN/A // Constructor 1167134Sgblack@eecs.umich.edu %(class_name)s(ExtMachInst machInst, IntRegIndex rn, 1177134Sgblack@eecs.umich.edu bool index, bool up, bool user, bool writeback, bool load, 1187134Sgblack@eecs.umich.edu uint32_t reglist); 1197169Sgblack@eecs.umich.edu %(BasicExecPanic)s 1206253SN/A}; 1216019SN/A}}; 1226019SN/A 1237134Sgblack@eecs.umich.edudef template MacroMemConstructor {{ 1247170Sgblack@eecs.umich.edu%(class_name)s::%(class_name)s(ExtMachInst machInst, IntRegIndex rn, 1257134Sgblack@eecs.umich.edu bool index, bool up, bool user, bool writeback, bool load, 1267134Sgblack@eecs.umich.edu uint32_t reglist) 1277170Sgblack@eecs.umich.edu : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, rn, 1287170Sgblack@eecs.umich.edu index, up, user, writeback, load, reglist) 1296253SN/A{ 1306253SN/A %(constructor)s; 1316253SN/A} 1326019SN/A 1336019SN/A}}; 134