1// Copyright (c) 2008 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 41 unchanged lines hidden (view full) --- 50 def add_microop(self, mnemonic, microop): 51 microop.mnemonic = mnemonic 52 microop.micropc = len(self.microops) 53 self.microops.append(microop) 54 55 56 def getDeclaration(self): 57 declareLabels = "namespace RomLabels {\n" |
58 for (label, microop) in self.externs.items(): 59 declareLabels += \ 60 "const static MicroPC extern_label_%s = %d;\n" \ 61 % (label, microop.micropc) 62 declareLabels += "}\n" 63 return declareLabels; 64 65 def getDefinition(self): --- 22 unchanged lines hidden --- |