macroop.isa (12584:2af98e1fb894) macroop.isa (13675:afeab32b3655)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

328 (self.size, size)
329}};
330
331let {{
332 doModRMString = "env.doModRM(machInst);\n"
333 noModRMString = "env.setSeg(machInst);\n"
334 def genMacroop(Name, env):
335 blocks = OutputBlocks()
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

328 (self.size, size)
329}};
330
331let {{
332 doModRMString = "env.doModRM(machInst);\n"
333 noModRMString = "env.setSeg(machInst);\n"
334 def genMacroop(Name, env):
335 blocks = OutputBlocks()
336 if not macroopDict.has_key(Name):
336 if not Name in macroopDict:
337 raise Exception, "Unrecognized instruction: %s" % Name
338 macroop = macroopDict[Name]
339 if not macroop.declared:
340 if env.doModRM:
341 macroop.initEnv = doModRMString
342 else:
343 macroop.initEnv = noModRMString
344 blocks.header_output = macroop.getDeclaration()
345 blocks.decoder_output = macroop.getDefinition(env)
346 macroop.declared = True
347 blocks.decode_block = "return %s;\n" % macroop.getAllocator(env)
348 return blocks
349}};
337 raise Exception, "Unrecognized instruction: %s" % Name
338 macroop = macroopDict[Name]
339 if not macroop.declared:
340 if env.doModRM:
341 macroop.initEnv = doModRMString
342 else:
343 macroop.initEnv = noModRMString
344 blocks.header_output = macroop.getDeclaration()
345 blocks.decoder_output = macroop.getDefinition(env)
346 macroop.declared = True
347 blocks.decode_block = "return %s;\n" % macroop.getAllocator(env)
348 return blocks
349}};