Deleted Added
sdiff udiff text old ( 4224:7e828583f2cb ) new ( 4648:173a212f5091 )
full compact
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

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

144 %(fp_enable_check)s;
145 %(op_decl)s;
146 %(op_rd)s;
147 %(ea_code)s;
148 DPRINTF(Sparc, "%s: The address is 0x%x\n", mnemonic, EA);
149 %(fault_check)s;
150 if(fault == NoFault)
151 {
152 fault = xc->read(EA, (%(mem_acc_type)s%(mem_acc_size)s_t&)Mem, %(asi_val)s);
153 }
154 if(fault == NoFault)
155 {
156 %(code)s;
157 }
158 if(fault == NoFault)
159 {

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

174 %(fp_enable_check)s;
175 %(op_decl)s;
176 %(op_rd)s;
177 %(ea_code)s;
178 DPRINTF(Sparc, "%s: The address is 0x%x\n", mnemonic, EA);
179 %(fault_check)s;
180 if(fault == NoFault)
181 {
182 fault = xc->read(EA, (%(mem_acc_type)s%(mem_acc_size)s_t&)Mem, %(asi_val)s);
183 }
184 return fault;
185 }
186}};
187
188def template LoadCompleteAcc {{
189 Fault %(class_name)s::completeAcc(PacketPtr pkt, %(CPU_exec_context)s * xc,

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

219 DPRINTF(Sparc, "%s: The address is 0x%x\n", mnemonic, EA);
220 %(fault_check)s;
221 if(fault == NoFault)
222 {
223 %(code)s;
224 }
225 if(storeCond && fault == NoFault)
226 {
227 fault = xc->write((%(mem_acc_type)s%(mem_acc_size)s_t)Mem,
228 EA, %(asi_val)s, 0);
229 }
230 if(fault == NoFault)
231 {
232 //Write the resulting state to the execution context
233 %(op_wb)s;
234 }

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

252 DPRINTF(Sparc, "%s: The address is 0x%x\n", mnemonic, EA);
253 %(fault_check)s;
254 if(fault == NoFault)
255 {
256 %(code)s;
257 }
258 if(storeCond && fault == NoFault)
259 {
260 fault = xc->write((%(mem_acc_type)s%(mem_acc_size)s_t)Mem,
261 EA, %(asi_val)s, 0);
262 }
263 if(fault == NoFault)
264 {
265 //Write the resulting state to the execution context
266 %(op_wb)s;
267 }

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

312 AlternateASIPrivFaultCheck = '''
313 if(!bits(Pstate,2,2) && !bits(Hpstate,2,2) && !AsiIsUnPriv((ASI)EXT_ASI) ||
314 !bits(Hpstate,2,2) && AsiIsHPriv((ASI)EXT_ASI))
315 fault = new PrivilegedAction;
316 else if(AsiIsAsIfUser((ASI)EXT_ASI) && !bits(Pstate,2,2))
317 fault = new PrivilegedAction;
318 '''
319
320}};
321
322//A simple function to generate the name of the macro op of a certain
323//instruction at a certain micropc
324let {{
325 def makeMicroName(name, microPc):
326 return name + "::" + name + "_" + str(microPc)
327}};

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

341
342 def doDualSplitExecute(code, postacc_code, eaRegCode, eaImmCode, execute,
343 faultCode, nameReg, nameImm, NameReg, NameImm, asi, opt_flags):
344 executeCode = ''
345 for (eaCode, name, Name) in (
346 (eaRegCode, nameReg, NameReg),
347 (eaImmCode, nameImm, NameImm)):
348 microParams = {"code": code, "postacc_code" : postacc_code,
349 "ea_code": eaCode, "fault_check": faultCode}
350 executeCode += doSplitExecute(execute, name, Name,
351 asi, opt_flags, microParams)
352 return executeCode
353}};