mem.isa (6245:f8692407cc23) | mem.isa (6250:1cc6e860d95f) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 43 unchanged lines hidden (view full) --- 52 int32_t disp; 53 int32_t disp8; 54 int32_t up; 55 int32_t hilo, 56 shift_size, 57 shift; 58 59 /// Constructor | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Florida State University 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 43 unchanged lines hidden (view full) --- 52 int32_t disp; 53 int32_t disp8; 54 int32_t up; 55 int32_t hilo, 56 shift_size, 57 shift; 58 59 /// Constructor |
60 Memory(const char *mnem, MachInst _machInst, OpClass __opClass, | 60 Memory(const char *mnem, ExtMachInst _machInst, OpClass __opClass, |
61 StaticInstPtr _eaCompPtr = nullStaticInstPtr, 62 StaticInstPtr _memAccPtr = nullStaticInstPtr) 63 : PredOp(mnem, _machInst, __opClass), 64 memAccessFlags(0), eaCompPtr(_eaCompPtr), memAccPtr(_memAccPtr), 65 disp(IMMED_11_0), disp8(IMMED_7_0 << 2), up(UP), 66 hilo((IMMED_HI_11_8 << 4) | IMMED_LO_3_0), 67 shift_size(SHIFT_SIZE), shift(SHIFT) 68 { --- 60 unchanged lines hidden (view full) --- 129 130 /** 131 * "Fake" effective address computation class for "%(mnemonic)s". 132 */ 133 class EAComp : public %(base_class)s 134 { 135 public: 136 /// Constructor | 61 StaticInstPtr _eaCompPtr = nullStaticInstPtr, 62 StaticInstPtr _memAccPtr = nullStaticInstPtr) 63 : PredOp(mnem, _machInst, __opClass), 64 memAccessFlags(0), eaCompPtr(_eaCompPtr), memAccPtr(_memAccPtr), 65 disp(IMMED_11_0), disp8(IMMED_7_0 << 2), up(UP), 66 hilo((IMMED_HI_11_8 << 4) | IMMED_LO_3_0), 67 shift_size(SHIFT_SIZE), shift(SHIFT) 68 { --- 60 unchanged lines hidden (view full) --- 129 130 /** 131 * "Fake" effective address computation class for "%(mnemonic)s". 132 */ 133 class EAComp : public %(base_class)s 134 { 135 public: 136 /// Constructor |
137 EAComp(MachInst machInst); | 137 EAComp(ExtMachInst machInst); |
138 139 %(BasicExecDeclare)s 140 }; 141 142 /** 143 * "Fake" memory access instruction class for "%(mnemonic)s". 144 */ 145 class MemAcc : public %(base_class)s 146 { 147 public: 148 /// Constructor | 138 139 %(BasicExecDeclare)s 140 }; 141 142 /** 143 * "Fake" memory access instruction class for "%(mnemonic)s". 144 */ 145 class MemAcc : public %(base_class)s 146 { 147 public: 148 /// Constructor |
149 MemAcc(MachInst machInst); | 149 MemAcc(ExtMachInst machInst); |
150 151 %(BasicExecDeclare)s 152 }; 153 154 public: 155 156 /// Constructor. | 150 151 %(BasicExecDeclare)s 152 }; 153 154 public: 155 156 /// Constructor. |
157 %(class_name)s(MachInst machInst); | 157 %(class_name)s(ExtMachInst machInst); |
158 159 %(BasicExecDeclare)s 160 161 %(InitiateAccDeclare)s 162 163 %(CompleteAccDeclare)s 164 }; 165}}; --- 5 unchanged lines hidden (view full) --- 171 172 173def template CompleteAccDeclare {{ 174 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *, Trace::InstRecord *) const; 175}}; 176 177 178def template EACompConstructor {{ | 158 159 %(BasicExecDeclare)s 160 161 %(InitiateAccDeclare)s 162 163 %(CompleteAccDeclare)s 164 }; 165}}; --- 5 unchanged lines hidden (view full) --- 171 172 173def template CompleteAccDeclare {{ 174 Fault completeAcc(PacketPtr, %(CPU_exec_context)s *, Trace::InstRecord *) const; 175}}; 176 177 178def template EACompConstructor {{ |
179 inline %(class_name)s::EAComp::EAComp(MachInst machInst) | 179 inline %(class_name)s::EAComp::EAComp(ExtMachInst machInst) |
180 : %(base_class)s("%(mnemonic)s (EAComp)", machInst, IntAluOp) 181 { 182 %(constructor)s; 183 } 184}}; 185 186 187def template MemAccConstructor {{ | 180 : %(base_class)s("%(mnemonic)s (EAComp)", machInst, IntAluOp) 181 { 182 %(constructor)s; 183 } 184}}; 185 186 187def template MemAccConstructor {{ |
188 inline %(class_name)s::MemAcc::MemAcc(MachInst machInst) | 188 inline %(class_name)s::MemAcc::MemAcc(ExtMachInst machInst) |
189 : %(base_class)s("%(mnemonic)s (MemAcc)", machInst, %(op_class)s) 190 { 191 %(constructor)s; 192 } 193}}; 194 195 196def template LoadStoreConstructor {{ | 189 : %(base_class)s("%(mnemonic)s (MemAcc)", machInst, %(op_class)s) 190 { 191 %(constructor)s; 192 } 193}}; 194 195 196def template LoadStoreConstructor {{ |
197 inline %(class_name)s::%(class_name)s(MachInst machInst) | 197 inline %(class_name)s::%(class_name)s(ExtMachInst machInst) |
198 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 199 new EAComp(machInst), new MemAcc(machInst)) 200 { 201 %(constructor)s; 202 } 203}}; 204 205 --- 356 unchanged lines hidden --- | 198 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, 199 new EAComp(machInst), new MemAcc(machInst)) 200 { 201 %(constructor)s; 202 } 203}}; 204 205 --- 356 unchanged lines hidden --- |