specop.isa (7682:37c56be05af0) specop.isa (8610:9bdd52a2214c)
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// Copyright (c) 2011 Mark D. Hill and David A. Wood
2// All rights reserved.
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license
9// terms below provided that you ensure that this notice is replicated

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

198 pass
199
200 def getAllocator(self, microFlags):
201 return "new MicroHalt(machInst, macrocodeBlock, %s)" % \
202 self.microFlagsText(microFlags)
203
204 microopClasses["halt"] = Halt
205}};
3// All rights reserved.
4//
5// The license below extends only to copyright in the software and shall
6// not be construed as granting a license to any other intellectual
7// property including but not limited to intellectual property relating
8// to a hardware implementation of the functionality of the software
9// licensed hereunder. You may use the software subject to the license
10// terms below provided that you ensure that this notice is replicated

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

199 pass
200
201 def getAllocator(self, microFlags):
202 return "new MicroHalt(machInst, macrocodeBlock, %s)" % \
203 self.microFlagsText(microFlags)
204
205 microopClasses["halt"] = Halt
206}};
207
208def template MicroFenceOpDeclare {{
209 class %(class_name)s : public X86ISA::X86MicroopBase
210 {
211 public:
212 %(class_name)s(ExtMachInst _machInst,
213 const char * instMnem,
214 uint64_t setFlags);
215
216 %(BasicExecDeclare)s
217 };
218}};
219
220def template MicroFenceOpConstructor {{
221 inline %(class_name)s::%(class_name)s(
222 ExtMachInst machInst, const char * instMnem, uint64_t setFlags) :
223 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
224 setFlags, %(op_class)s)
225 {
226 %(constructor)s;
227 }
228}};
229
230let {{
231 class MfenceOp(X86Microop):
232 def __init__(self):
233 self.className = "Mfence"
234 self.mnemonic = "mfence"
235 self.instFlags = "| (1ULL << StaticInst::IsMemBarrier)"
236
237 def getAllocator(self, microFlags):
238 allocString = '''
239 (StaticInstPtr)(new %(class_name)s(machInst,
240 macrocodeBlock, %(flags)s))
241 '''
242 allocator = allocString % {
243 "class_name" : self.className,
244 "mnemonic" : self.mnemonic,
245 "flags" : self.microFlagsText(microFlags) + self.instFlags}
246 return allocator
247
248 microopClasses["mfence"] = MfenceOp
249}};
250
251let {{
252 # Build up the all register version of this micro op
253 iop = InstObjParams("mfence", "Mfence", 'X86MicroopBase',
254 {"code" : ""})
255 header_output += MicroFenceOpDeclare.subst(iop)
256 decoder_output += MicroFenceOpConstructor.subst(iop)
257 exec_output += BasicExecute.subst(iop)
258}};