mt.isa revision 2686
12686Sksewell@umich.edu// -*- mode:c++ -*-
22686Sksewell@umich.edu
32686Sksewell@umich.edu////////////////////////////////////////////////////////////////////
42686Sksewell@umich.edu//
52686Sksewell@umich.edu// MT instructions
62686Sksewell@umich.edu//
72686Sksewell@umich.edu
82686Sksewell@umich.eduoutput header {{
92686Sksewell@umich.edu        /**
102686Sksewell@umich.edu         * Base class for integer operations.
112686Sksewell@umich.edu         */
122686Sksewell@umich.edu        class MT : public MipsStaticInst
132686Sksewell@umich.edu        {
142686Sksewell@umich.edu                protected:
152686Sksewell@umich.edu
162686Sksewell@umich.edu                /// Constructor
172686Sksewell@umich.edu                MT(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
182686Sksewell@umich.edu                {
192686Sksewell@umich.edu                }
202686Sksewell@umich.edu
212686Sksewell@umich.edu                std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
222686Sksewell@umich.edu        };
232686Sksewell@umich.edu}};
242686Sksewell@umich.edu
252686Sksewell@umich.eduoutput decoder {{
262686Sksewell@umich.edu        //Edit This Template When MT is Implemented
272686Sksewell@umich.edu        std::string MT::generateDisassembly(Addr pc, const SymbolTable *symtab) const
282686Sksewell@umich.edu        {
292686Sksewell@umich.edu                return "Disassembly of MT instruction\n";
302686Sksewell@umich.edu        }
312686Sksewell@umich.edu}};
322686Sksewell@umich.edu
332686Sksewell@umich.edudef template MTExecute {{
342686Sksewell@umich.edu        //Edit This Template When MT is Implemented
352686Sksewell@umich.edu        Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
362686Sksewell@umich.edu        {
372686Sksewell@umich.edu                //Write the resulting state to the execution context
382686Sksewell@umich.edu                %(op_wb)s;
392686Sksewell@umich.edu
402686Sksewell@umich.edu                //Call into the trap handler with the appropriate fault
412686Sksewell@umich.edu                return No_Fault;
422686Sksewell@umich.edu        }
432686Sksewell@umich.edu}};
442686Sksewell@umich.edu
452686Sksewell@umich.edu// Primary format for integer operate instructions:
462686Sksewell@umich.edudef format MipsMT() {{
472686Sksewell@umich.edu        code = 'panic(\"Mips MT Is Currently Unimplemented.\");\n'
482686Sksewell@umich.edu        iop = InstObjParams(name, Name, 'MT', CodeBlock(code))
492686Sksewell@umich.edu        header_output = BasicDeclare.subst(iop)
502686Sksewell@umich.edu        decoder_output = BasicConstructor.subst(iop)
512686Sksewell@umich.edu        decode_block = BasicDecode.subst(iop)
522686Sksewell@umich.edu        exec_output = BasicExecute.subst(iop)
532686Sksewell@umich.edu}};
54