fp.isa revision 2573
1// -*- mode:c++ -*-
2
3////////////////////////////////////////////////////////////////////
4//
5// Floating Point operate instructions
6//
7
8output header {{
9        /**
10         * Base class for FP operations.
11         */
12        class FPOp : public MipsStaticInst
13        {
14                protected:
15
16                /// Constructor
17                FPOp(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        std::string FPOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
27        {
28                return "Disassembly of integer instruction\n";
29        }
30}};
31
32
33// Primary format for float operate instructions:
34def format FloatOp(code, *flags) {{
35        iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), flags)
36        header_output = BasicDeclare.subst(iop)
37        decoder_output = BasicConstructor.subst(iop)
38        decode_block = BasicDecode.subst(iop)
39        exec_output = BasicExecute.subst(iop)
40}};
41
42// Primary format for float64 operate instructions:
43def format Float64Op(code, *flags) {{
44        iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), flags)
45        header_output = BasicDeclare.subst(iop)
46        decoder_output = BasicConstructor.subst(iop)
47        decode_block = BasicDecode.subst(iop)
48        exec_output = BasicExecute.subst(iop)
49}};
50