mt.isa revision 2741
12810SN/A// -*- mode:c++ -*-
212724Snikos.nikoleris@arm.com
38856Sandreas.hansson@arm.com// Copyright (c) 2006 The Regents of The University of Michigan
48856Sandreas.hansson@arm.com// All rights reserved.
58856Sandreas.hansson@arm.com//
68856Sandreas.hansson@arm.com// Redistribution and use in source and binary forms, with or without
78856Sandreas.hansson@arm.com// modification, are permitted provided that the following conditions are
88856Sandreas.hansson@arm.com// met: redistributions of source code must retain the above copyright
98856Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer;
108856Sandreas.hansson@arm.com// redistributions in binary form must reproduce the above copyright
118856Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer in the
128856Sandreas.hansson@arm.com// documentation and/or other materials provided with the distribution;
138856Sandreas.hansson@arm.com// neither the name of the copyright holders nor the names of its
142810SN/A// contributors may be used to endorse or promote products derived from
152810SN/A// this software without specific prior written permission.
162810SN/A//
172810SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182810SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192810SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202810SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212810SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222810SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232810SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242810SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252810SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262810SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272810SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282810SN/A//
292810SN/A// Authors: Korey Sewell
302810SN/A
312810SN/A////////////////////////////////////////////////////////////////////
322810SN/A//
332810SN/A// MT instructions
342810SN/A//
352810SN/A
362810SN/Aoutput header {{
372810SN/A        /**
382810SN/A         * Base class for MIPS MT ASE operations.
392810SN/A         */
402810SN/A        class MT : public MipsStaticInst
4112724Snikos.nikoleris@arm.com        {
422810SN/A                protected:
432810SN/A
442810SN/A                /// Constructor
452810SN/A                MT(const char *mnem, MachInst _machInst, OpClass __opClass) :
462810SN/A                    MipsStaticInst(mnem, _machInst, __opClass)
472810SN/A                {
482810SN/A                }
4911486Snikos.nikoleris@arm.com
5011486Snikos.nikoleris@arm.com                std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
5112724Snikos.nikoleris@arm.com        };
5212724Snikos.nikoleris@arm.com}};
538232Snate@binkert.org
5412724Snikos.nikoleris@arm.comoutput decoder {{
5513222Sodanrc@yahoo.com.br        //Edit This Template When MT is Implemented
5612724Snikos.nikoleris@arm.com        std::string MT::generateDisassembly(Addr pc, const SymbolTable *symtab) const
5711486Snikos.nikoleris@arm.com        {
5812724Snikos.nikoleris@arm.com                return "Disassembly of MT instruction\n";
5912724Snikos.nikoleris@arm.com        }
6012724Snikos.nikoleris@arm.com}};
6113352Snikos.nikoleris@arm.com
6212724Snikos.nikoleris@arm.comdef template MTExecute {{
6312724Snikos.nikoleris@arm.com        //Edit This Template When MT is Implemented
6412724Snikos.nikoleris@arm.com        Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
6512724Snikos.nikoleris@arm.com        {
662810SN/A                //Write the resulting state to the execution context
672810SN/A                %(op_wb)s;
682810SN/A
698856Sandreas.hansson@arm.com                //Call into the trap handler with the appropriate fault
708856Sandreas.hansson@arm.com                return No_Fault;
718856Sandreas.hansson@arm.com        }
7213564Snikos.nikoleris@arm.com}};
7313564Snikos.nikoleris@arm.com
7412084Sspwilson2@wisc.edu// Primary format for integer operate instructions:
7512084Sspwilson2@wisc.edudef format MipsMT() {{
768856Sandreas.hansson@arm.com        code = 'panic(\"Mips MT Is Currently Unimplemented.\");\n'
778856Sandreas.hansson@arm.com        iop = InstObjParams(name, Name, 'MT', CodeBlock(code))
784475SN/A        header_output = BasicDeclare.subst(iop)
7911053Sandreas.hansson@arm.com        decoder_output = BasicConstructor.subst(iop)
805034SN/A        decode_block = BasicDecode.subst(iop)
8112724Snikos.nikoleris@arm.com        exec_output = BasicExecute.subst(iop)
8212724Snikos.nikoleris@arm.com}};
8311377Sandreas.hansson@arm.com