• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# OperandType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OpCode

 internal OpCode(string name, byte op1, byte op2, int size, FlowControl flowControl,
     OpCodeType opCodeType, OperandType operandType,
     StackBehaviour pop, StackBehaviour push)
 {
     m_name = name;
     m_op1 = op1;
     m_op2 = op2;
     m_size = size;
     m_flowControl = flowControl;
     m_opCodeType = opCodeType;
     m_operandType = operandType;
     m_stackBehaviourPop = pop;
     m_stackBehaviourPush = push;
 }
开发者ID:leftouterjoin,项目名称:loj-prj1,代码行数:14,代码来源:OpCode.cs


示例17: OpCode

        internal OpCode(int x, int y)
        {
            m_op1 = (byte)((x >> 0) & 0xff);
            m_op2 = (byte)((x >> 8) & 0xff);
            m_code = (Code)((x >> 16) & 0xff);
            m_flowControl = (FlowControl)((x >> 24) & 0xff);
            m_size = 0;
            m_name = "";

            m_opCodeType = (OpCodeType)((y >> 0) & 0xff);
            m_operandType = (OperandType)((y >> 8) & 0xff);
            m_stackBehaviourPop = (StackBehaviour)((y >> 16) & 0xff);
            m_stackBehaviourPush = (StackBehaviour)((y >> 24) & 0xff);
        }
开发者ID:KenMacD,项目名称:deconfuser,代码行数:14,代码来源:OpCode.cs


示例18: OpCode

	internal OpCode(String stringname, StackBehaviour pop, StackBehaviour push, OperandType operand, OpCodeType type, int size, byte s1, byte s2, FlowControl ctrl, bool endsjmpblk, int stack)
	{
		m_stringname = stringname;
		m_pop = pop;
		m_push = push;
		m_operand = operand;
		m_type = type;
		m_size = size;
		m_s1 = s1;
		m_s2 = s2;
		m_ctrl = ctrl;
		m_endsUncondJmpBlk = endsjmpblk;
		m_stackChange = stack;

	}
开发者ID:ArildF,项目名称:masters,代码行数:15,代码来源:opcode.cs


示例19: VerifyOpCodeType

    private bool VerifyOpCodeType(OpCode op1, OperandType ot, string errNum)
    {
        bool retVal = true;

        try
        {
            if (op1.OperandType != ot)
            {
                TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,OperandType is: " + op1.OperandType + ",Expected is: " + ot);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
            retVal = false;
        }
        return retVal;
    }
开发者ID:CheneyWu,项目名称:coreclr,代码行数:19,代码来源:opcodeoperandtype.cs


示例20: OpCode

	// Construct a new opcode.
	internal OpCode(String name, int value, FlowControl flowControl,
					OpCodeType opcodeType, OperandType operandType,
					StackBehaviour stackPop, StackBehaviour stackPush)
			{
				this.name = name;
				this.value = (short)value;
				this.flowControl = (byte)flowControl;
				this.opcodeType = (byte)opcodeType;
				this.operandType = (byte)operandType;
				if(value < 0x0100)
				{
					this.size = (byte)1;
				}
				else
				{
					this.size = (byte)2;
				}
				this.stackPop = (byte)stackPop;
				this.stackPush = (byte)stackPush;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:21,代码来源:OpCode.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Operation类代码示例发布时间:2022-05-24
下一篇:
C# Operand类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap