mt.isa revision 2706
12686Sksewell@umich.edu// -*- mode:c++ -*- 22686Sksewell@umich.edu 32706Sksewell@umich.edu// Copyright (c) 2003-2006 The Regents of The University of Michigan 42706Sksewell@umich.edu// All rights reserved. 52706Sksewell@umich.edu// 62706Sksewell@umich.edu// Redistribution and use in source and binary forms, with or without 72706Sksewell@umich.edu// modification, are permitted provided that the following conditions are 82706Sksewell@umich.edu// met: redistributions of source code must retain the above copyright 92706Sksewell@umich.edu// notice, this list of conditions and the following disclaimer; 102706Sksewell@umich.edu// redistributions in binary form must reproduce the above copyright 112706Sksewell@umich.edu// notice, this list of conditions and the following disclaimer in the 122706Sksewell@umich.edu// documentation and/or other materials provided with the distribution; 132706Sksewell@umich.edu// neither the name of the copyright holders nor the names of its 142706Sksewell@umich.edu// contributors may be used to endorse or promote products derived from 152706Sksewell@umich.edu// this software without specific prior written permission. 162706Sksewell@umich.edu// 172706Sksewell@umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182706Sksewell@umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192706Sksewell@umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202706Sksewell@umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212706Sksewell@umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222706Sksewell@umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232706Sksewell@umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242706Sksewell@umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252706Sksewell@umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262706Sksewell@umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272706Sksewell@umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282706Sksewell@umich.edu// 292706Sksewell@umich.edu// Authors: Korey Sewell 302706Sksewell@umich.edu 312686Sksewell@umich.edu//////////////////////////////////////////////////////////////////// 322686Sksewell@umich.edu// 332686Sksewell@umich.edu// MT instructions 342686Sksewell@umich.edu// 352686Sksewell@umich.edu 362686Sksewell@umich.eduoutput header {{ 372686Sksewell@umich.edu /** 382686Sksewell@umich.edu * Base class for integer operations. 392686Sksewell@umich.edu */ 402686Sksewell@umich.edu class MT : public MipsStaticInst 412686Sksewell@umich.edu { 422686Sksewell@umich.edu protected: 432686Sksewell@umich.edu 442686Sksewell@umich.edu /// Constructor 452686Sksewell@umich.edu MT(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass) 462686Sksewell@umich.edu { 472686Sksewell@umich.edu } 482686Sksewell@umich.edu 492686Sksewell@umich.edu std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const; 502686Sksewell@umich.edu }; 512686Sksewell@umich.edu}}; 522686Sksewell@umich.edu 532686Sksewell@umich.eduoutput decoder {{ 542686Sksewell@umich.edu //Edit This Template When MT is Implemented 552686Sksewell@umich.edu std::string MT::generateDisassembly(Addr pc, const SymbolTable *symtab) const 562686Sksewell@umich.edu { 572686Sksewell@umich.edu return "Disassembly of MT instruction\n"; 582686Sksewell@umich.edu } 592686Sksewell@umich.edu}}; 602686Sksewell@umich.edu 612686Sksewell@umich.edudef template MTExecute {{ 622686Sksewell@umich.edu //Edit This Template When MT is Implemented 632686Sksewell@umich.edu Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const 642686Sksewell@umich.edu { 652686Sksewell@umich.edu //Write the resulting state to the execution context 662686Sksewell@umich.edu %(op_wb)s; 672686Sksewell@umich.edu 682686Sksewell@umich.edu //Call into the trap handler with the appropriate fault 692686Sksewell@umich.edu return No_Fault; 702686Sksewell@umich.edu } 712686Sksewell@umich.edu}}; 722686Sksewell@umich.edu 732686Sksewell@umich.edu// Primary format for integer operate instructions: 742686Sksewell@umich.edudef format MipsMT() {{ 752686Sksewell@umich.edu code = 'panic(\"Mips MT Is Currently Unimplemented.\");\n' 762686Sksewell@umich.edu iop = InstObjParams(name, Name, 'MT', CodeBlock(code)) 772686Sksewell@umich.edu header_output = BasicDeclare.subst(iop) 782686Sksewell@umich.edu decoder_output = BasicConstructor.subst(iop) 792686Sksewell@umich.edu decode_block = BasicDecode.subst(iop) 802686Sksewell@umich.edu exec_output = BasicExecute.subst(iop) 812686Sksewell@umich.edu}}; 82