macroop.isa (5666:e7925fa8f0d6) macroop.isa (5692:0d6addcde185)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// Redistribution and use of this software in source and binary forms,
7// with or without modification, are permitted provided that the
8// following conditions are met:

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

215 return MacroDeclare.subst(iop);
216 def getDefinition(self):
217 #FIXME This first parameter should be the mnemonic. I need to
218 #write some code which pulls that out
219 numMicroops = len(self.microops)
220 allocMicroops = ''
221 micropc = 0
222 for op in self.microops:
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// Redistribution and use of this software in source and binary forms,
7// with or without modification, are permitted provided that the
8// following conditions are met:

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

215 return MacroDeclare.subst(iop);
216 def getDefinition(self):
217 #FIXME This first parameter should be the mnemonic. I need to
218 #write some code which pulls that out
219 numMicroops = len(self.microops)
220 allocMicroops = ''
221 micropc = 0
222 for op in self.microops:
223 isLast = (micropc == numMicroops - 1)
223 allocMicroops += \
224 "microops[%d] = %s;\n" % \
224 allocMicroops += \
225 "microops[%d] = %s;\n" % \
225 (micropc, op.getAllocator(True, False,
226 micropc == 0,
227 micropc == numMicroops - 1))
226 (micropc, op.getAllocator(True, not isLast,
227 micropc == 0, isLast))
228 micropc += 1
229 iop = InstObjParams(self.name, self.name, "Macroop",
230 {"code" : "", "num_microops" : numMicroops,
231 "alloc_microops" : allocMicroops,
232 "adjust_env" : self.adjust_env,
233 "adjust_imm" : self.adjust_imm,
234 "adjust_disp" : self.adjust_disp,
235 "do_modrm" : self.doModRM})

--- 78 unchanged lines hidden ---
228 micropc += 1
229 iop = InstObjParams(self.name, self.name, "Macroop",
230 {"code" : "", "num_microops" : numMicroops,
231 "alloc_microops" : allocMicroops,
232 "adjust_env" : self.adjust_env,
233 "adjust_imm" : self.adjust_imm,
234 "adjust_disp" : self.adjust_disp,
235 "do_modrm" : self.doModRM})

--- 78 unchanged lines hidden ---