macroop.isa (7087:fb8d5786ff30) | macroop.isa (7620:3d8a23caa1ef) |
---|---|
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 --- 171 unchanged lines hidden (view full) --- 180 return MacroDeclare.subst(iop); 181 def getDefinition(self, env): 182 #FIXME This first parameter should be the mnemonic. I need to 183 #write some code which pulls that out 184 numMicroops = len(self.microops) 185 allocMicroops = '' 186 micropc = 0 187 for op in self.microops: | 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 --- 171 unchanged lines hidden (view full) --- 180 return MacroDeclare.subst(iop); 181 def getDefinition(self, env): 182 #FIXME This first parameter should be the mnemonic. I need to 183 #write some code which pulls that out 184 numMicroops = len(self.microops) 185 allocMicroops = '' 186 micropc = 0 187 for op in self.microops: |
188 isLast = (micropc == numMicroops - 1) | 188 flags = ["IsMicroop"] 189 if micropc == numMicroops - 1: 190 flags.append("IsLastMicroop") 191 else: 192 flags.append("IsDelayedCommit") 193 if micropc == 0: 194 flags.append("IsFirstMicroop") |
189 allocMicroops += \ 190 "microops[%d] = %s;\n" % \ | 195 allocMicroops += \ 196 "microops[%d] = %s;\n" % \ |
191 (micropc, op.getAllocator(True, not isLast, 192 micropc == 0, isLast)) | 197 (micropc, op.getAllocator(flags)) |
193 micropc += 1 194 if env.useStackSize: 195 useStackSize = "true" 196 else: 197 useStackSize = "false" 198 if env.memoryInst: 199 memoryInst = "true" 200 else: --- 105 unchanged lines hidden --- | 198 micropc += 1 199 if env.useStackSize: 200 useStackSize = "true" 201 else: 202 useStackSize = "false" 203 if env.memoryInst: 204 memoryInst = "true" 205 else: --- 105 unchanged lines hidden --- |