basic.isa (12234:78ece221f9f5) | basic.isa (12236:126ac9da6050) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2011 ARM Limited 4// All rights reserved 5// 6// The license below extends only to copyright in the software and shall 7// not be construed as granting a license to any other intellectual 8// property including but not limited to intellectual property relating --- 26 unchanged lines hidden (view full) --- 35// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 36// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 37// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40// 41// Authors: Stephen Hines 42 | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2011 ARM Limited 4// All rights reserved 5// 6// The license below extends only to copyright in the software and shall 7// not be construed as granting a license to any other intellectual 8// property including but not limited to intellectual property relating --- 26 unchanged lines hidden (view full) --- 35// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 36// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 37// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40// 41// Authors: Stephen Hines 42 |
43// Declarations for execute() methods. 44def template BasicExecDeclare {{ 45 Fault execute(ExecContext *, Trace::InstRecord *) const; 46}}; 47 | |
48// Basic instruction class declaration template. 49def template BasicDeclare {{ 50 /** 51 * Static instruction class for "%(mnemonic)s". 52 */ 53 class %(class_name)s : public %(base_class)s 54 { 55 public: 56 /// Constructor. 57 %(class_name)s(ExtMachInst machInst); | 43// Basic instruction class declaration template. 44def template BasicDeclare {{ 45 /** 46 * Static instruction class for "%(mnemonic)s". 47 */ 48 class %(class_name)s : public %(base_class)s 49 { 50 public: 51 /// Constructor. 52 %(class_name)s(ExtMachInst machInst); |
58 %(BasicExecDeclare)s | 53 Fault execute(ExecContext *, Trace::InstRecord *) const; |
59 }; 60}}; 61 62// Basic instruction class constructor template. 63def template BasicConstructor {{ 64 %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s) 65 { 66 %(constructor)s; --- 36 unchanged lines hidden (view full) --- 103def template BasicDecode {{ 104 return new %(class_name)s(machInst); 105}}; 106 107// Basic decode template, passing mnemonic in as string arg to constructor. 108def template BasicDecodeWithMnemonic {{ 109 return new %(class_name)s("%(mnemonic)s", machInst); 110}}; | 54 }; 55}}; 56 57// Basic instruction class constructor template. 58def template BasicConstructor {{ 59 %(class_name)s::%(class_name)s(ExtMachInst machInst) : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s) 60 { 61 %(constructor)s; --- 36 unchanged lines hidden (view full) --- 98def template BasicDecode {{ 99 return new %(class_name)s(machInst); 100}}; 101 102// Basic decode template, passing mnemonic in as string arg to constructor. 103def template BasicDecodeWithMnemonic {{ 104 return new %(class_name)s("%(mnemonic)s", machInst); 105}}; |
111 112// Definitions of execute methods that panic. 113def template BasicExecPanic {{ 114Fault execute(ExecContext *, Trace::InstRecord *) const 115{ 116 panic("Execute method called when it shouldn't!"); 117 // GCC < 4.3 fail to recognize the above panic as no return 118 return NoFault; 119} 120}}; | |