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


C# OperandType类代码示例

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


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

示例1: Encode

 public void Encode(byte[] code, ref int offset, out OperandType operand, IState state)
 {
     operand = OperandType.None;
     Array.Copy(BitConverter.GetBytes(this.Routine.LittleEndian()), 0, code, offset + 2, 2);
     code[offset + 4] = this.ArgumentCount;
     offset += 5;
 }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:7,代码来源:CallNativeRoutine.cs

示例2: MSILOpCode

 internal MSILOpCode(string name, byte[] bytes, OperandType operandType, StackBehaviour stackBehaviour)
 {
     Name = name;
     Bytes = bytes;
     OperandType = operandType;
     StackBehaviour = stackBehaviour;
 }
开发者ID:Rex-Hays,项目名称:GNIDA2,代码行数:7,代码来源:MSILOpCode.cs

示例3: Decode

 public void Decode(byte[] code, ref int offset, OperandType operand, IState state)
 {
     this.Unknown1 = BitConverter.ToInt16(code, offset + 2).BigEndian();
     this.Unknown2 = BitConverter.ToInt16(code, offset + 4).BigEndian();
     this.Unknown3 = BitConverter.ToInt16(code, offset + 6).BigEndian();
     offset += 8;
 }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:7,代码来源:DestroyStackElement.cs

示例4: GetRegister

		public void GetRegister(OperandType operandType, RegisterIndex registerIndex, out Number4[] register, out int index)
		{
			switch (operandType)
			{
				case OperandType.ConstantBuffer:
					register = _virtualMachine.ConstantBuffers[registerIndex.Index2D_0];
					index = registerIndex.Index2D_1;
					return;
				case OperandType.Input:
					// Only GS requires 2-dimensional inputs, but for simplicity we always use a 2-dimensional input array.
					register = Inputs[registerIndex.Index2D_0];
					index = registerIndex.Index2D_1;
					return;
				case OperandType.Output:
					register = Outputs;
					index = registerIndex.Index1D;
					return;
				case OperandType.Temp:
					register = Temps;
					index = registerIndex.Index1D;
					return;
				case OperandType.IndexableTemp:
					register = IndexableTemps[registerIndex.Index2D_0];
					index = registerIndex.Index2D_1;
					return;
				default:
					throw new ArgumentException("Unsupported operand type: " + operandType);
			}
		}
开发者ID:modulexcite,项目名称:slimshader,代码行数:29,代码来源:ExecutionContext.cs

示例5: Instruction

 public Instruction(ushort pos, InstrCode code, OperandType operandType, ulong operand)
 {
     Pos = pos;
     Code = code;
     OperandType = operandType;
     Operand = operand;
 }
开发者ID:airbrush,项目名称:CSD,代码行数:7,代码来源:Instruction.cs

示例6: RegData

 public RegData(OperandType type, int size, int id, int code)
 {
     _op = checked((byte)type);
     _size = checked((byte)size);
     _id = id;
     _code = code;
 }
开发者ID:modulexcite,项目名称:nasmjit,代码行数:7,代码来源:RegData.cs

示例7: Decode

        public void Decode(byte[] code, ref int offset, OperandType operand, IState state)
        {
            if (operand != OperandType.None)
            {
                throw new InvalidOperationException();
            }

            offset += 2;
        }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:9,代码来源:Return.cs

示例8: AutoSizedOperand

 protected AutoSizedOperand(OperandType type,
                            OperandValueType valueType = OperandValueType.Dword,
                            bool isPointer = false,
                            bool isOffset = false,
                            Register offsetRegister = Register.R0,
                            int payload = 0)
     : base(type, valueType, isPointer, isOffset, offsetRegister, payload)
 {
 }
开发者ID:Rohansi,项目名称:LoonyC,代码行数:9,代码来源:Operand.cs

示例9: Decode

        public void Decode(byte[] code, ref int offset, OperandType operand, IState state)
        {
            if (operand != OperandType.None)
            {
                throw new InvalidOperationException();
            }

            this.Value = BitConverter.ToInt32(code, offset + 2).BigEndian();
            offset += 6;
        }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:10,代码来源:AdjustStackPointer.cs

示例10: Decode

        public void Decode(byte[] code, ref int offset, OperandType operand, IState state)
        {
            if (operand != OperandType.IntegerInteger &&
                operand != OperandType.FloatFloat)
            {
                throw new InvalidOperationException();
            }

            this.Operand = operand;
            offset += 2;
        }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:11,代码来源:LessThanOrEqual.cs

示例11: Decode

        public void Decode(byte[] code, ref int offset, OperandType operand, IState state)
        {
            if (operand != OperandType.None)
            {
                throw new InvalidOperationException();
            }

            this.Routine = BitConverter.ToInt16(code, offset + 2).BigEndian();
            this.ArgumentCount = code[offset + 4];
            offset += 5;
        }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:11,代码来源:CallNativeRoutine.cs

示例12: Operand

 public Operand(Processor cpu, OperandType optype)
 {
     Type = optype;
     switch (Type)
     {
         case OperandType.AddressBlock:
             Address = new AddressBlock(cpu, cpu.ReadULong());
             break;
         case OperandType.Register:
             // add
             break;
         case OperandType.StackIndex:
             // add
             break;
         case OperandType.NumericByte:
             Value = new ByteBlock(cpu.ReadByte());
             break;
         case OperandType.NumericSByte:
             Value = new ByteBlock(cpu.ReadSByte());
             break;
         case OperandType.NumericShort:
             Value = new ByteBlock(cpu.ReadShort());
             break;
         case OperandType.NumericUShort:
             Value = new ByteBlock(cpu.ReadUShort());
             break;
         case OperandType.NumericInt:
             Value = new ByteBlock(cpu.ReadInt());
             break;
         case OperandType.NumericUInt:
             Value = new ByteBlock(cpu.ReadUInt());
             break;
         case OperandType.NumericLong:
             Value = new ByteBlock(cpu.ReadLong());
             break;
         case OperandType.NumericULong:
             Value = new ByteBlock(cpu.ReadULong());
             break;
         case OperandType.NumericFloat:
             Value = new ByteBlock(cpu.ReadFloat());
             break;
         case OperandType.NumericDouble:
             Value = new ByteBlock(cpu.ReadDouble());
             break;
         case OperandType.LPString:
             uint length = cpu.ReadUInt();
             ByteBlock bytes = cpu.Read(length);
             Value = new ByteBlock(System.Text.Encoding.UTF8.GetString(bytes.ToByteArray()));
             break;
         default:
             break;
     }
 }
开发者ID:Celarix,项目名称:IronArc,代码行数:53,代码来源:Operand.cs

示例13: OpCode

		internal OpCode(string name, Code code, OperandType operandType, FlowControl flowControl, OpCodeType opCodeType, StackBehaviour push, StackBehaviour pop) {
			this.Name = name;
			this.Code = code;
			this.OperandType = operandType;
			this.FlowControl = flowControl;
			this.OpCodeType = opCodeType;
			this.StackBehaviourPush = push;
			this.StackBehaviourPop = pop;
			if (((ushort)code >> 8) == 0)
				OpCodes.OneByteOpCodes[(byte)code] = this;
			else if (((ushort)code >> 8) == 0xFE)
				OpCodes.TwoByteOpCodes[(byte)code] = this;
		}
开发者ID:EmilZhou,项目名称:dnlib,代码行数:13,代码来源:OpCode.cs

示例14: Decode

 public void Decode(byte[] code, ref int offset, OperandType operand, IState state)
 {
     this.Operand = operand;
     if (operand == Script.OperandType.StructureStructure)
     {
         this.StructureSize = BitConverter.ToInt16(code, offset + 2).BigEndian();
         offset += 4;
     }
     else
     {
         offset += 2;
     }
 }
开发者ID:dhk-room101,项目名称:da2_toolset,代码行数:13,代码来源:Equal.cs

示例15: Operand

 protected Operand(OperandType type,
                   OperandValueType valueType = OperandValueType.Dword,
                   bool isPointer = false,
                   bool isOffset = false,
                   Register offsetRegister = Register.R0,
                   int payload = 0)
 {
     Type = type;
     ValueType = valueType;
     IsPointer = isPointer;
     IsOffset = isOffset;
     OffsetRegister = offsetRegister;
     Payload = payload;
 }
开发者ID:Rohansi,项目名称:LoonyC,代码行数:14,代码来源:Operand.cs


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