示例#1
0
            public override X86Instruction Decode(uint op, X86Disassembler disasm)
            {
                var ctx = disasm.decodingContext;

                if ((ctx.SizeOverridePrefix | ctx.F2Prefix | ctx.F3Prefix) ||
                    !disasm.TryReadByte(out byte op2))
                {
                    return(disasm.CreateInvalidInstruction());
                }
                var r    = (~op2 >> 5) & 4;
                var vvvv = (~op2 >> 3) & 0xF;
                var pp   = op2 & 3;

                ctx.IsVex       = true;
                ctx.VexRegister = (byte)vvvv;
                ctx.RegisterExtensionPrefixByte = (byte)r;
                ctx.VexLong            = (op2 & 4) != 0;
                ctx.F2Prefix           = pp == 3;
                ctx.F3Prefix           = pp == 2;
                ctx.SizeOverridePrefix = pp == 1;
                if (!disasm.TryReadByte(out op2) ||
                    op2 == 0x38 || op2 == 0x3A)
                {
                    return(disasm.CreateInvalidInstruction());
                }
                return(decoders0F[op2].Decode(op2, disasm));
            }