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 --- 21 unchanged lines hidden (view full) --- 30 31// Declarations for execute() methods. 32def template BasicExecDeclare {{ 33 Fault execute(%(CPU_exec_context)s *, Trace::InstRecord *) const; 34}}; 35 36// Definitions of execute methods that panic. 37def template BasicExecPanic {{ |
38 Fault 39 execute(%(CPU_exec_context)s *, Trace::InstRecord *) const |
40 { 41 panic("Execute method called when it shouldn't!"); 42 M5_DUMMY_RETURN 43 } 44}}; 45 46// Basic instruction class declaration template. 47def template BasicDeclare {{ --- 39 unchanged lines hidden (view full) --- 87 : %(base_class)s(mnemonic, machInst, %(op_class)s) 88 { 89 %(constructor)s; 90 } 91}}; 92 93// Basic instruction class execute method template. 94def template BasicExecute {{ |
95 Fault 96 %(class_name)s::execute(%(CPU_exec_context)s *xc, |
97 Trace::InstRecord *traceData) const 98 { 99 Fault fault = NoFault; 100 101 %(fp_enable_check)s; 102 %(op_decl)s; 103 %(op_rd)s; 104 %(code)s; 105 |
106 if (fault == NoFault) { |
107 %(op_wb)s; 108 } 109 return fault; 110 } 111}}; 112 113// Basic decode template. 114def template BasicDecode {{ --- 46 unchanged lines hidden --- |