basic.isa (12234:78ece221f9f5) basic.isa (12236:126ac9da6050)
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license

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

33// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38//
39// Authors: Gabe Black
40
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license

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

33// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38//
39// Authors: Gabe Black
40
41// Declarations for execute() methods.
42def template BasicExecDeclare {{
43 Fault execute(ExecContext *, Trace::InstRecord *) const;
44}};
45
46// Definitions of execute methods that panic.
47def template BasicExecPanic {{
48 Fault execute(ExecContext *, Trace::InstRecord *) const
49 {
50 panic("Execute method called when it shouldn't!");
51 M5_DUMMY_RETURN
52 }
53}};
54
55// Basic instruction class declaration template.
56def template BasicDeclare {{
57 /**
58 * Static instruction class for "%(mnemonic)s".
59 */
60 class %(class_name)s : public %(base_class)s
61 {
62 public:
63 // Constructor.
64 %(class_name)s(ExtMachInst machInst);
41// Basic instruction class declaration template.
42def template BasicDeclare {{
43 /**
44 * Static instruction class for "%(mnemonic)s".
45 */
46 class %(class_name)s : public %(base_class)s
47 {
48 public:
49 // Constructor.
50 %(class_name)s(ExtMachInst machInst);
65 %(BasicExecDeclare)s
51 Fault execute(ExecContext *, Trace::InstRecord *) const;
66 };
67}};
68
69// Basic instruction class constructor template.
70def template BasicConstructor {{
71 %(class_name)s::%(class_name)s(ExtMachInst machInst)
72 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
73 {

--- 41 unchanged lines hidden ---
52 };
53}};
54
55// Basic instruction class constructor template.
56def template BasicConstructor {{
57 %(class_name)s::%(class_name)s(ExtMachInst machInst)
58 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
59 {

--- 41 unchanged lines hidden ---