mt.isa revision 2686:f0d591379ac3
1// -*- mode:c++ -*-
2
3////////////////////////////////////////////////////////////////////
4//
5// MT instructions
6//
7
8output header {{
9        /**
10         * Base class for integer operations.
11         */
12        class MT : public MipsStaticInst
13        {
14                protected:
15
16                /// Constructor
17                MT(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
18                {
19                }
20
21                std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
22        };
23}};
24
25output decoder {{
26        //Edit This Template When MT is Implemented
27        std::string MT::generateDisassembly(Addr pc, const SymbolTable *symtab) const
28        {
29                return "Disassembly of MT instruction\n";
30        }
31}};
32
33def template MTExecute {{
34        //Edit This Template When MT is Implemented
35        Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
36        {
37                //Write the resulting state to the execution context
38                %(op_wb)s;
39
40                //Call into the trap handler with the appropriate fault
41                return No_Fault;
42        }
43}};
44
45// Primary format for integer operate instructions:
46def format MipsMT() {{
47        code = 'panic(\"Mips MT Is Currently Unimplemented.\");\n'
48        iop = InstObjParams(name, Name, 'MT', CodeBlock(code))
49        header_output = BasicDeclare.subst(iop)
50        decoder_output = BasicConstructor.subst(iop)
51        decode_block = BasicDecode.subst(iop)
52        exec_output = BasicExecute.subst(iop)
53}};
54