nop.isa revision 2022
1////////////////////////////////////////////////////////////////////
2//
3// Noop instruction
4//
5
6output header {{
7        /**
8         * Base class for integer operations.
9         */
10        class Noop : public SparcStaticInst
11        {
12                protected:
13
14                /// Constructor
15                Noop(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass)
16                {
17                }
18
19                std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
20        };
21}};
22
23output decoder {{
24        std::string Noop::generateDisassembly(Addr pc, const SymbolTable *symtab) const
25        {
26                return "Disassembly of integer instruction\n";
27        }
28}};
29
30def template NoopExecute {{
31        Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const
32        {
33                //Nothing to see here, move along
34                return No_Fault;
35        }
36}};
37
38// Primary format for integer operate instructions:
39def format Noop(code, *opt_flags) {{
40        orig_code = code
41        cblk = CodeBlock(code)
42        iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags)
43        header_output = BasicDeclare.subst(iop)
44        decoder_output = BasicConstructor.subst(iop)
45        decode_block = BasicDecodeWithMnemonic.subst(iop)
46        exec_output = NoopExecute.subst(iop)
47}};
48