rom.isa (5666:e7925fa8f0d6) | rom.isa (5667:78b94954f66a) |
---|---|
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" | 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.labels.items(): 59 declareLabels += "const static uint64_t label_%s = %d;\n" \ 60 % (label, microop.micropc) | |
61 for (label, microop) in self.externs.items(): 62 declareLabels += \ 63 "const static MicroPC extern_label_%s = %d;\n" \ 64 % (label, microop.micropc) 65 declareLabels += "}\n" 66 return declareLabels; 67 68 def getDefinition(self): --- 22 unchanged lines hidden --- | 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 --- |