misc64.isa revision 12280
12623SN/A// -*- mode:c++ -*-
22623SN/A
32623SN/A// Copyright (c) 2011,2017 ARM Limited
42623SN/A// All rights reserved
52623SN/A//
62623SN/A// The license below extends only to copyright in the software and shall
72623SN/A// not be construed as granting a license to any other intellectual
82623SN/A// property including but not limited to intellectual property relating
92623SN/A// to a hardware implementation of the functionality of the software
102623SN/A// licensed hereunder.  You may use the software subject to the license
112623SN/A// terms below provided that you ensure that this notice is replicated
122623SN/A// unmodified and in its entirety in all distributions of the software,
132623SN/A// modified or unmodified, in source code or in binary form.
142623SN/A//
152623SN/A// Redistribution and use in source and binary forms, with or without
162623SN/A// modification, are permitted provided that the following conditions are
172623SN/A// met: redistributions of source code must retain the above copyright
182623SN/A// notice, this list of conditions and the following disclaimer;
192623SN/A// redistributions in binary form must reproduce the above copyright
202623SN/A// notice, this list of conditions and the following disclaimer in the
212623SN/A// documentation and/or other materials provided with the distribution;
222623SN/A// neither the name of the copyright holders nor the names of its
232623SN/A// contributors may be used to endorse or promote products derived from
242623SN/A// this software without specific prior written permission.
252623SN/A//
262623SN/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
292623SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
302623SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
312623SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
322623SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
332623SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
342623SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
352623SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
365529Snate@binkert.org// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
375529Snate@binkert.org//
382623SN/A// Authors: Gabe Black
392623SN/A
402623SN/Adef template RegRegImmImmOp64Declare {{
412623SN/Aclass %(class_name)s : public %(base_class)s
425529Snate@binkert.org{
432623SN/A  protected:
442623SN/A    public:
452623SN/A        // Constructor
462623SN/A        %(class_name)s(ExtMachInst machInst,
472623SN/A                       IntRegIndex _dest, IntRegIndex _op1,
482839Sktlim@umich.edu                       uint64_t _imm1, uint64_t _imm2);
492798Sktlim@umich.edu        Fault execute(ExecContext *, Trace::InstRecord *) const;
502623SN/A};
512623SN/A}};
525728Sgblack@eecs.umich.edu
535728Sgblack@eecs.umich.edudef template RegRegImmImmOp64Constructor {{
545728Sgblack@eecs.umich.edu    %(class_name)s::%(class_name)s(ExtMachInst machInst,
555728Sgblack@eecs.umich.edu                                          IntRegIndex _dest,
565728Sgblack@eecs.umich.edu                                          IntRegIndex _op1,
575728Sgblack@eecs.umich.edu                                          uint64_t _imm1,
585728Sgblack@eecs.umich.edu                                          uint64_t _imm2)
595728Sgblack@eecs.umich.edu        : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
605728Sgblack@eecs.umich.edu                         _dest, _op1, _imm1, _imm2)
615728Sgblack@eecs.umich.edu    {
625728Sgblack@eecs.umich.edu        %(constructor)s;
635728Sgblack@eecs.umich.edu    }
645728Sgblack@eecs.umich.edu}};
655728Sgblack@eecs.umich.edu
665728Sgblack@eecs.umich.edudef template RegRegRegImmOp64Declare {{
675728Sgblack@eecs.umich.educlass %(class_name)s : public %(base_class)s
685728Sgblack@eecs.umich.edu{
695728Sgblack@eecs.umich.edu  protected:
705728Sgblack@eecs.umich.edu    public:
715728Sgblack@eecs.umich.edu        // Constructor
725728Sgblack@eecs.umich.edu        %(class_name)s(ExtMachInst machInst,
735728Sgblack@eecs.umich.edu                       IntRegIndex _dest, IntRegIndex _op1,
745728Sgblack@eecs.umich.edu                       IntRegIndex _op2, uint64_t _imm);
755728Sgblack@eecs.umich.edu        Fault execute(ExecContext *, Trace::InstRecord *) const;
765728Sgblack@eecs.umich.edu};
775728Sgblack@eecs.umich.edu}};
785728Sgblack@eecs.umich.edu
795728Sgblack@eecs.umich.edudef template RegRegRegImmOp64Constructor {{
805728Sgblack@eecs.umich.edu    %(class_name)s::%(class_name)s(ExtMachInst machInst,
815728Sgblack@eecs.umich.edu                                          IntRegIndex _dest,
825728Sgblack@eecs.umich.edu                                          IntRegIndex _op1,
835728Sgblack@eecs.umich.edu                                          IntRegIndex _op2,
845728Sgblack@eecs.umich.edu                                          uint64_t _imm)
855728Sgblack@eecs.umich.edu        : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
865728Sgblack@eecs.umich.edu                         _dest, _op1, _op2, _imm)
875728Sgblack@eecs.umich.edu    {
885728Sgblack@eecs.umich.edu        %(constructor)s;
895728Sgblack@eecs.umich.edu    }
905728Sgblack@eecs.umich.edu}};
915728Sgblack@eecs.umich.edu
925728Sgblack@eecs.umich.edudef template MiscRegRegOp64Declare {{
935728Sgblack@eecs.umich.educlass %(class_name)s : public %(base_class)s
945728Sgblack@eecs.umich.edu{
955728Sgblack@eecs.umich.edu    public:
965728Sgblack@eecs.umich.edu        // Constructor
975728Sgblack@eecs.umich.edu        %(class_name)s(ExtMachInst machInst, MiscRegIndex _dest,
985728Sgblack@eecs.umich.edu                IntRegIndex _op1, uint64_t _imm);
995894Sgblack@eecs.umich.edu
1005894Sgblack@eecs.umich.edu        Fault execute(ExecContext *, Trace::InstRecord *) const;
1015894Sgblack@eecs.umich.edu};
1025894Sgblack@eecs.umich.edu}};
1035894Sgblack@eecs.umich.edu
1045894Sgblack@eecs.umich.edudef template MiscRegRegOp64Constructor {{
1056023Snate@binkert.org    %(class_name)s::%(class_name)s(ExtMachInst machInst,
1066023Snate@binkert.org                                          MiscRegIndex _dest,
1075894Sgblack@eecs.umich.edu                                          IntRegIndex _op1,
1085894Sgblack@eecs.umich.edu                                          uint64_t _imm)
1096023Snate@binkert.org        : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
1106023Snate@binkert.org                         _dest, _op1, _imm)
1116023Snate@binkert.org    {
1125894Sgblack@eecs.umich.edu        %(constructor)s;
1135894Sgblack@eecs.umich.edu    }
1145894Sgblack@eecs.umich.edu}};
1155894Sgblack@eecs.umich.edu
1165894Sgblack@eecs.umich.edudef template RegMiscRegOp64Declare {{
1175894Sgblack@eecs.umich.educlass %(class_name)s : public %(base_class)s
1185894Sgblack@eecs.umich.edu{
1195894Sgblack@eecs.umich.edu    public:
1205894Sgblack@eecs.umich.edu        // Constructor
1215894Sgblack@eecs.umich.edu        %(class_name)s(ExtMachInst machInst, IntRegIndex _dest,
1225894Sgblack@eecs.umich.edu                MiscRegIndex _op1, uint64_t _imm);
1235894Sgblack@eecs.umich.edu
1246023Snate@binkert.org        Fault execute(ExecContext *, Trace::InstRecord *) const;
1255894Sgblack@eecs.umich.edu};
1265894Sgblack@eecs.umich.edu}};
1275894Sgblack@eecs.umich.edu
1286023Snate@binkert.orgdef template RegMiscRegOp64Constructor {{
1296023Snate@binkert.org    %(class_name)s::%(class_name)s(ExtMachInst machInst,
1306023Snate@binkert.org                                          IntRegIndex _dest,
1316023Snate@binkert.org                                          MiscRegIndex _op1,
1326023Snate@binkert.org                                          uint64_t _imm)
1335894Sgblack@eecs.umich.edu        : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s,
1345894Sgblack@eecs.umich.edu                         _dest, _op1, _imm)
1356023Snate@binkert.org    {
1366023Snate@binkert.org        %(constructor)s;
1375894Sgblack@eecs.umich.edu    }
1386023Snate@binkert.org}};
1396023Snate@binkert.org