diff options
Diffstat (limited to 'src/arch/x86/isa')
-rw-r--r-- | src/arch/x86/isa/specialize.isa | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/arch/x86/isa/specialize.isa b/src/arch/x86/isa/specialize.isa index 779abefc7..5a21c0944 100644 --- a/src/arch/x86/isa/specialize.isa +++ b/src/arch/x86/isa/specialize.isa @@ -96,6 +96,15 @@ let {{ }}; let {{ + def doBadInstDecode(): + blocks = OutputBlocks() + blocks.decode_block = ''' + return new Unknown(machInst); + ''' + return blocks +}}; + +let {{ class OpType(object): parser = re.compile(r"(?P<tag>[A-Z]+)(?P<size>[a-z]*)|(r(?P<reg>[A-Z0-9]+)(?P<rsize>[a-z]*))") def __init__(self, opTypeString): @@ -146,7 +155,9 @@ let {{ # This refers to memory. The macroop constructor sets up modrm # addressing. Non memory modrm settings should cause an error. env.doModRM = True - return doRipRelativeDecode(Name, opTypes, env) + return doSplitDecode("MODRM_MOD", + {"3" : (doBadInstDecode,) }, + (doRipRelativeDecode, Name, opTypes, env)) elif opType.tag == None or opType.size == None: raise Exception, "Problem parsing operand tag: %s" % opType.tag elif opType.tag == "C": |