Deleted Added
sdiff udiff text old ( 4720:15cb65a86e5a ) new ( 4767:5e55d650692e )
full compact
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

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

118 Fault fault = NoFault;
119 Addr EA;
120
121 %(op_decl)s;
122 %(op_rd)s;
123 %(ea_code)s;
124 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
125
126 unsigned flags = 0;
127 switch(dataSize)
128 {
129 case 1:
130 fault = xc->read(EA, (uint8_t&)Mem, flags);
131 break;
132 case 2:
133 fault = xc->read(EA, (uint16_t&)Mem, flags);
134 break;
135 case 4:
136 fault = xc->read(EA, (uint32_t&)Mem, flags);
137 break;
138 case 8:
139 fault = xc->read(EA, (uint64_t&)Mem, flags);
140 break;
141 default:
142 panic("Bad operand size!\n");
143 }
144
145 if(fault == NoFault)
146 {
147 %(code)s;
148 }
149 if(fault == NoFault)
150 {
151 %(op_wb)s;

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

162 Fault fault = NoFault;
163 Addr EA;
164
165 %(op_decl)s;
166 %(op_rd)s;
167 %(ea_code)s;
168 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
169
170 unsigned flags = 0;
171 switch(dataSize)
172 {
173 case 1:
174 fault = xc->read(EA, (uint8_t&)Mem, flags);
175 break;
176 case 2:
177 fault = xc->read(EA, (uint16_t&)Mem, flags);
178 break;
179 case 4:
180 fault = xc->read(EA, (uint32_t&)Mem, flags);
181 break;
182 case 8:
183 fault = xc->read(EA, (uint64_t&)Mem, flags);
184 break;
185 default:
186 panic("Bad operand size!\n");
187 }
188
189 return fault;
190 }
191}};
192
193def template MicroLoadCompleteAcc {{
194 Fault %(class_name)s::completeAcc(PacketPtr pkt,
195 %(CPU_exec_context)s * xc,
196 Trace::InstRecord * traceData) const
197 {
198 Fault fault = NoFault;
199
200 %(op_decl)s;
201 %(op_rd)s;
202
203 Mem = pkt->get<typeof(Mem)>();
204 %(code)s;
205
206 if(fault == NoFault)
207 {
208 %(op_wb)s;
209 }
210
211 return fault;

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

225 %(op_rd)s;
226 %(ea_code)s;
227 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
228
229 %(code)s;
230
231 if(fault == NoFault)
232 {
233 unsigned flags = 0;
234 uint64_t *res = 0;
235 switch(dataSize)
236 {
237 case 1:
238 fault = xc->write((uint8_t&)Mem, EA, flags, res);
239 break;
240 case 2:
241 fault = xc->write((uint16_t&)Mem, EA, flags, res);
242 break;
243 case 4:
244 fault = xc->write((uint32_t&)Mem, EA, flags, res);
245 break;
246 case 8:
247 fault = xc->write((uint64_t&)Mem, EA, flags, res);
248 break;
249 default:
250 panic("Bad operand size!\n");
251 }
252 }
253 if(fault == NoFault)
254 {
255 %(op_wb)s;
256 }
257
258 return fault;
259 }
260}};
261
262def template MicroStoreInitiateAcc {{
263 Fault %(class_name)s::initiateAcc(%(CPU_exec_context)s * xc,
264 Trace::InstRecord * traceData) const

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

270 %(op_rd)s;
271 %(ea_code)s;
272 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
273
274 %(code)s;
275
276 if(fault == NoFault)
277 {
278 unsigned flags = 0;
279 uint64_t *res = 0;
280 switch(dataSize)
281 {
282 case 1:
283 fault = xc->write((uint8_t&)Mem, EA, flags, res);
284 break;
285 case 2:
286 fault = xc->write((uint16_t&)Mem, EA, flags, res);
287 break;
288 case 4:
289 fault = xc->write((uint32_t&)Mem, EA, flags, res);
290 break;
291 case 8:
292 fault = xc->write((uint64_t&)Mem, EA, flags, res);
293 break;
294 default:
295 panic("Bad operand size!\n");
296 }
297 }
298 if(fault == NoFault)
299 {
300 %(op_wb)s;
301 }
302 return fault;
303 }
304}};
305
306def template MicroStoreCompleteAcc {{
307 Fault %(class_name)s::completeAcc(PacketPtr, %(CPU_exec_context)s * xc,
308 Trace::InstRecord * traceData) const
309 {

--- 195 unchanged lines hidden ---