specop.isa (5449:89b696c8b754) specop.isa (5788:6d4161a36ca1)
1// Copyright (c) 2007-2008 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

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

225 if not isinstance(flags, (list, tuple)):
226 raise Exception, "flags must be a list or tuple of flags"
227 self.cond = " | ".join(flags)
228 self.className += "Flags"
229 else:
230 self.cond = "0"
231
232 def getAllocator(self, *microFlags):
1// Copyright (c) 2007-2008 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

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

225 if not isinstance(flags, (list, tuple)):
226 raise Exception, "flags must be a list or tuple of flags"
227 self.cond = " | ".join(flags)
228 self.className += "Flags"
229 else:
230 self.cond = "0"
231
232 def getAllocator(self, *microFlags):
233 allocator = '''new %(class_name)s(machInst, mnemonic
233 allocator = '''new %(class_name)s(machInst, macrocodeBlock
234 %(flags)s, %(fault)s, %(cc)s)''' % {
235 "class_name" : self.className,
236 "flags" : self.microFlagsText(microFlags),
237 "fault" : self.fault,
238 "cc" : self.cond}
239 return allocator
240
241 iop = InstObjParams("fault", "MicroFaultFlags", "MicroFaultBase",

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

252 decoder_output += MicroFaultConstructor.subst(iop)
253 microopClasses["fault"] = Fault
254
255 class Halt(X86Microop):
256 def __init__(self):
257 pass
258
259 def getAllocator(self, *microFlags):
234 %(flags)s, %(fault)s, %(cc)s)''' % {
235 "class_name" : self.className,
236 "flags" : self.microFlagsText(microFlags),
237 "fault" : self.fault,
238 "cc" : self.cond}
239 return allocator
240
241 iop = InstObjParams("fault", "MicroFaultFlags", "MicroFaultBase",

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

252 decoder_output += MicroFaultConstructor.subst(iop)
253 microopClasses["fault"] = Fault
254
255 class Halt(X86Microop):
256 def __init__(self):
257 pass
258
259 def getAllocator(self, *microFlags):
260 return "new MicroHalt(machInst, mnemonic %s)" % \
260 return "new MicroHalt(machInst, macrocodeBlock %s)" % \
261 self.microFlagsText(microFlags)
262
263 microopClasses["halt"] = Halt
264}};
261 self.microFlagsText(microFlags)
262
263 microopClasses["halt"] = Halt
264}};