Deleted Added
sdiff udiff text old ( 4323:13ca4002d2ac ) new ( 4336:bd6ab22f8e11 )
full compact
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:

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

52// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
53// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55//
56// Authors: Gabe Black
57
58////////////////////////////////////////////////////////////////////
59//
60// Code to "assemble" microcode sequences
61//
62
63let {{
64 class MicroOpStatement:
65 def __init__(self):
66 self.className = ''
67 self.label = ''
68 self.args = []
69
70 # This converts a list of python bools into
71 # a comma seperated list of C++ bools.
72 def microFlagsText(self, vals):

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

96 def buildLabelDict(ops):
97 labels = {}
98 micropc = 0
99 for op in ops:
100 if op.label:
101 labels[op.label] = count
102 micropc += 1
103 return labels
104
105 def assembleMicro(code):
106 # This function takes in a block of microcode assembly and returns
107 # a python list of objects which describe it.
108
109 # Keep this around in case we need it later
110 orig_code = code
111 # A list of the statements we've found thus far
112 statements = []

--- 87 unchanged lines hidden ---