当前位置: 首页>>代码示例>>C#>>正文


C# x86.ParsedOperand类代码示例

本文整理汇总了C#中Reko.Assemblers.x86.ParsedOperand的典型用法代码示例。如果您正苦于以下问题:C# ParsedOperand类的具体用法?C# ParsedOperand怎么用?C# ParsedOperand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ParsedOperand类属于Reko.Assemblers.x86命名空间,在下文中一共展示了ParsedOperand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Shr

 public void Shr(ParsedOperand dst, byte c)
 {
     ProcessShiftRotation(0x05, dst, new ParsedOperand(new ImmediateOperand(Constant.Byte(c))));
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:X86Assembler.cs

示例2: ProcessUnary

 internal void ProcessUnary(int operation, ParsedOperand op)
 {
     PrimitiveType dataWidth = EnsureValidOperandSize(op);
     EmitOpcode(0xF6 | IsWordWidth(dataWidth), dataWidth);
     EmitModRM(operation, op);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:6,代码来源:X86Assembler.cs

示例3: EmitModRM

 internal void EmitModRM(int reg, ParsedOperand op, byte b)
 {
     RegisterOperand regOp = op.Operand as RegisterOperand;
     if (regOp != null)
     {
         modRm.EmitModRM(reg, regOp);
         emitter.EmitByte(b);
     }
     else
     {
         EmitModRM(reg, (MemoryOperand) op.Operand, b, op.Symbol);
     }
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:13,代码来源:X86Assembler.cs

示例4: Mul

        public void Mul(ParsedOperand op)
        {
            PrimitiveType dataWidth = EnsureValidOperandSize(op);
            // Single operand doesn't accept immediate values.
            if (op.Operand is ImmediateOperand)
                Error("Immediate operand not allowed for single-argument multiplication");

            EmitOpcode(0xF6 | IsWordWidth(dataWidth), dataWidth);
            EmitModRM(4, op);
        }
开发者ID:gitter-badger,项目名称:reko,代码行数:10,代码来源:X86Assembler.cs

示例5: ProcessSetCc

 internal void ProcessSetCc(byte bits, ParsedOperand op)
 {
     PrimitiveType dataWidth = EnsureValidOperandSize(op);
     if (dataWidth != PrimitiveType.Byte)
         Error("Instruction takes only a byte operand");
     EmitOpcode(0x0F, dataWidth);
     emitter.EmitByte(0x90 | (bits & 0xF));
     EmitModRM(0, op);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:9,代码来源:X86Assembler.cs

示例6: ProcessFst

 internal void ProcessFst(bool pop, ParsedOperand operand)
 {
     FpuOperand fop = operand.Operand as FpuOperand;
     MemoryOperand mop = operand.Operand as MemoryOperand;
     int regBits = pop ? 3 : 2;
     if (mop != null)
     {
         switch (mop.Width.Size)
         {
         case 4: EmitOpcode(0xD9, null); break;
         case 8: EmitOpcode(0xDD, null); break;
         default: Error("Unexpected operator width"); break;
         }
         EmitModRM(regBits, operand);
     }
     else if (fop != null)
     {
         EmitOpcode(0xDD, null);
         EmitModRM(regBits, new ParsedOperand(fop, null));
     }
     else
         Error("Unexpected operator type");
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:23,代码来源:X86Assembler.cs

示例7: ProcessInt

 internal void ProcessInt(ParsedOperand vector)
 {
     ImmediateOperand op = (ImmediateOperand) vector.Operand;
     EmitOpcode(0xCD, null);
     emitter.EmitByte(op.Value.ToInt32());
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:6,代码来源:X86Assembler.cs

示例8: Bsr

 public void Bsr(ParsedOperand dst, ParsedOperand src)
 {
     ProcessBitScan(0xBD, dst, src);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:X86Assembler.cs

示例9: Cmp

 public void Cmp(ParsedOperand src, int dst)
 {
     ProcessBinop(0x7, src, Imm(dst));
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:X86Assembler.cs

示例10: Shld

 public void Shld(ParsedOperand op1, ParsedOperand op2, ParsedOperand op3)
 {
     ProcessDoubleShift(0, op1, op2, op3);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:X86Assembler.cs

示例11: Shrd

 public void Shrd(ParsedOperand op1, ParsedOperand op2, byte count)
 {
     ProcessDoubleShift(8, op1, op2, new ParsedOperand(ImmediateOperand.Byte(count)));
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:X86Assembler.cs

示例12: ProcessDoubleShift

        internal void ProcessDoubleShift(byte bits, ParsedOperand op0, ParsedOperand op1, ParsedOperand count)
        {
            PrimitiveType dataWidth = EnsureValidOperandSize(op0);

            RegisterOperand regSrc = op1.Operand as RegisterOperand;
            if (regSrc == null)
                Error("Second operand of SHLD/SHRD must be a register");

            ImmediateOperand immShift = count.Operand as ImmediateOperand;
            RegisterOperand regShift = count.Operand as RegisterOperand;
            if (regShift != null && regShift.Register == Registers.cl)
            {
                bits |= 0x01;
            }
            else if (immShift == null)
            {
                Error("SHLD/SHRD instruction must be followed by a constant or CL");
            }

            EmitOpcode(0x0F, dataWidth);
            emitter.EmitByte(0xA4 | bits);
            EmitModRM(RegisterEncoding(regSrc.Register), op0);
            if (immShift != null)
                emitter.EmitByte((byte) immShift.Value.ToUInt32());
        }
开发者ID:gitter-badger,项目名称:reko,代码行数:25,代码来源:X86Assembler.cs

示例13: ProcessCallJmp

 internal void ProcessCallJmp(bool far, int indirect, ParsedOperand op)
 {
     if (far) indirect |= 1;
     EmitOpcode(0xFF, SegmentDataWidth);
     EmitModRM(indirect, op);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:6,代码来源:X86Assembler.cs

示例14: ProcessBitScan

 internal void ProcessBitScan(byte opCode, ParsedOperand dst, ParsedOperand src)
 {
     PrimitiveType dataWidth = EnsureValidOperandSize(src);
     RegisterOperand regDst = dst.Operand as RegisterOperand;
     if (regDst == null)
         Error("First operand of bit scan instruction must be a register");
     EmitOpcode(0x0F, dataWidth);
     emitter.EmitByte(opCode);
     EmitModRM(RegisterEncoding(regDst.Register), src);
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:10,代码来源:X86Assembler.cs

示例15: EnsureValidOperandSize

 internal PrimitiveType EnsureValidOperandSize(ParsedOperand op)
 {
     PrimitiveType w = op.Operand.Width;
     if (w == null)
         Error("Width of the operand is unknown");
     return w;
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:X86Assembler.cs


注:本文中的Reko.Assemblers.x86.ParsedOperand类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。