basic.isa (12234:78ece221f9f5) basic.isa (12236:126ac9da6050)
1// Copyright (c) 2006-2007 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

--- 14 unchanged lines hidden (view full) ---

23// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26//
27// Authors: Ali Saidi
28// Gabe Black
29// Steve Reinhardt
30
1// Copyright (c) 2006-2007 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

--- 14 unchanged lines hidden (view full) ---

23// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26//
27// Authors: Ali Saidi
28// Gabe Black
29// Steve Reinhardt
30
31// Declarations for execute() methods.
32def template BasicExecDeclare {{
33 Fault execute(ExecContext *, Trace::InstRecord *) const;
34}};
35
36def template DoFpOpDeclare {{
37 Fault doFpOp(ExecContext *, Trace::InstRecord *)
38 const M5_NO_INLINE;
39}};
40
41// Definitions of execute methods that panic.
42def template BasicExecPanic {{
43 Fault
44 execute(ExecContext *, Trace::InstRecord *) const
45 {
46 panic("Execute method called when it shouldn't!");
47 M5_DUMMY_RETURN
48 }
49}};
50
51// Basic instruction class declaration template.
52def template BasicDeclare {{
53 /**
54 * Static instruction class for "%(mnemonic)s".
55 */
56 class %(class_name)s : public %(base_class)s
57 {
58 public:
59 // Constructor.
60 %(class_name)s(ExtMachInst machInst);
31// Basic instruction class declaration template.
32def template BasicDeclare {{
33 /**
34 * Static instruction class for "%(mnemonic)s".
35 */
36 class %(class_name)s : public %(base_class)s
37 {
38 public:
39 // Constructor.
40 %(class_name)s(ExtMachInst machInst);
61 %(BasicExecDeclare)s
41 Fault execute(ExecContext *, Trace::InstRecord *) const;
62 };
63}};
64
65// Basic instruction class declaration template.
66def template FpBasicDeclare {{
67 /**
68 * Static instruction class for "%(mnemonic)s".
69 */
70 class %(class_name)s : public %(base_class)s
71 {
72 public:
73 // Constructor.
74 %(class_name)s(ExtMachInst machInst);
42 };
43}};
44
45// Basic instruction class declaration template.
46def template FpBasicDeclare {{
47 /**
48 * Static instruction class for "%(mnemonic)s".
49 */
50 class %(class_name)s : public %(base_class)s
51 {
52 public:
53 // Constructor.
54 %(class_name)s(ExtMachInst machInst);
75 %(BasicExecDeclare)s
76 %(DoFpOpDeclare)s
55 Fault execute(ExecContext *, Trace::InstRecord *) const;
56 Fault doFpOp(ExecContext *,
57 Trace::InstRecord *) const M5_NO_INLINE;
77 };
78}};
79
80// Basic instruction class declaration template.
81def template BasicDeclareWithMnemonic {{
82 /**
83 * Static instruction class for "%(mnemonic)s".
84 */
85 class %(class_name)s : public %(base_class)s
86 {
87 public:
88 // Constructor.
89 %(class_name)s(const char * mnemonic, ExtMachInst machInst);
58 };
59}};
60
61// Basic instruction class declaration template.
62def template BasicDeclareWithMnemonic {{
63 /**
64 * Static instruction class for "%(mnemonic)s".
65 */
66 class %(class_name)s : public %(base_class)s
67 {
68 public:
69 // Constructor.
70 %(class_name)s(const char * mnemonic, ExtMachInst machInst);
90 %(BasicExecDeclare)s
71 Fault execute(ExecContext *, Trace::InstRecord *) const;
91 };
92}};
93
94// Basic instruction class constructor template.
95def template BasicConstructor {{
96 %(class_name)s::%(class_name)s(ExtMachInst machInst)
97 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
98 {

--- 98 unchanged lines hidden ---
72 };
73}};
74
75// Basic instruction class constructor template.
76def template BasicConstructor {{
77 %(class_name)s::%(class_name)s(ExtMachInst machInst)
78 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
79 {

--- 98 unchanged lines hidden ---