basic.isa (2632:1bb2f91485ea) basic.isa (2944:10dcffb2904f)
1// Copyright (c) 2006 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

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

58
59// Basic instruction class execute method template.
60def template BasicExecute {{
61 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
62 Trace::InstRecord *traceData) const
63 {
64 Fault fault = NoFault;
65
1// Copyright (c) 2006 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

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

58
59// Basic instruction class execute method template.
60def template BasicExecute {{
61 Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
62 Trace::InstRecord *traceData) const
63 {
64 Fault fault = NoFault;
65
66 %(fp_enable_check)s;
67 %(op_decl)s;
68 %(op_rd)s;
69 %(code)s;
70
71 if(fault == NoFault)
72 {
73 %(op_wb)s;
74 }
75 return fault;
76 }
77}};
78
79// Basic decode template.
80def template BasicDecode {{
81 return new %(class_name)s(machInst);
82}};
83
66 %(op_decl)s;
67 %(op_rd)s;
68 %(code)s;
69
70 if(fault == NoFault)
71 {
72 %(op_wb)s;
73 }
74 return fault;
75 }
76}};
77
78// Basic decode template.
79def template BasicDecode {{
80 return new %(class_name)s(machInst);
81}};
82
84// Basic decode template, passing mnemonic in as string arg to constructor.
85def template BasicDecodeWithMnemonic {{
86 return new %(class_name)s("%(mnemonic)s", machInst);
87}};
88
89// The most basic instruction format... used only for a few misc. insts
90def format BasicOperate(code, *flags) {{
91 iop = InstObjParams(name, Name, 'SparcStaticInst',
92 CodeBlock(code), flags)
93 header_output = BasicDeclare.subst(iop)
94 decoder_output = BasicConstructor.subst(iop)
95 decode_block = BasicDecode.subst(iop)
96 exec_output = BasicExecute.subst(iop)
97}};
83// The most basic instruction format... used only for a few misc. insts
84def format BasicOperate(code, *flags) {{
85 iop = InstObjParams(name, Name, 'SparcStaticInst',
86 CodeBlock(code), flags)
87 header_output = BasicDeclare.subst(iop)
88 decoder_output = BasicConstructor.subst(iop)
89 decode_block = BasicDecode.subst(iop)
90 exec_output = BasicExecute.subst(iop)
91}};