Skip to content
Snippets Groups Projects
Commit df63044d authored by Richard Henderson's avatar Richard Henderson
Browse files

decodetree: Split out MultiPattern from IncMultiPattern


Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 040145c4
No related branches found
No related tags found
No related merge requests found
......@@ -371,28 +371,43 @@ def output_code(self, i, extracted, outerbits, outermask):
# end Pattern
class IncMultiPattern(General):
"""Class representing an overlapping set of instruction patterns"""
class MultiPattern(General):
"""Class representing a set of instruction patterns"""
def __init__(self, lineno, pats, fixb, fixm, udfm, w):
def __init__(self, lineno, pats):
self.file = input_file
self.lineno = lineno
self.pats = pats
self.base = None
self.fixedbits = fixb
self.fixedmask = fixm
self.undefmask = udfm
self.width = w
self.fixedbits = 0
self.fixedmask = 0
self.undefmask = 0
self.width = None
def __str__(self):
r = "{"
for p in self.pats:
r = r + ' ' + str(p)
return r + "}"
r = 'group'
if self.fixedbits is not None:
r += ' ' + str_match_bits(self.fixedbits, self.fixedmask)
return r
def output_decl(self):
for p in self.pats:
p.output_decl()
# end MultiPattern
class IncMultiPattern(MultiPattern):
"""Class representing an overlapping set of instruction patterns"""
def __init__(self, lineno, pats, fixb, fixm, udfm, w):
self.file = input_file
self.lineno = lineno
self.pats = pats
self.base = None
self.fixedbits = fixb
self.fixedmask = fixm
self.undefmask = udfm
self.width = w
def output_code(self, i, extracted, outerbits, outermask):
global translate_prefix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment