unknown.isa revision 2469
1////////////////////////////////////////////////////////////////////
2//
3// Unknown instructions
4//
5
6output header {{
7        /**
8         * Class for Unknown/Illegal instructions
9         */
10        class Unknown : public SparcStaticInst
11        {
12          public:
13
14            // Constructor
15            Unknown(ExtMachInst _machInst) :
16                    SparcStaticInst("unknown", _machInst, No_OpClass)
17            {
18            }
19
20            %(BasicExecDeclare)s
21
22            std::string generateDisassembly(Addr pc,
23                    const SymbolTable *symtab) const;
24
25        };
26}};
27
28output decoder {{
29        std::string Unknown::generateDisassembly(Addr pc,
30                const SymbolTable *symtab) const
31        {
32            return "Unknown instruction\n";
33        }
34}};
35
36output exec {{
37        Fault Unknown::execute(%(CPU_exec_context)s *xc,
38                Trace::InstRecord *traceData) const
39        {
40            return new IllegalInstruction;
41        }
42}};
43
44def format Unknown() {{
45        decode_block = 'return new Unknown(machInst);\n'
46}};
47