Esempio n. 1
0
        /// <summary>
        /// Gets the memory.
        /// </summary>
        /// <param name="operand">The operand.</param>
        /// <param name="emit">if set to <c>true</c> [emit].</param>
        /// <returns></returns>
        private Memory GetMemory(Operand operand)
        {
            Memory address = null;

            if (operand is FieldOperand)
            {
                address = this.GetAddress(operand as FieldOperand);
            }
            else if (operand is Argument)
            {
                address = this.GetAddress(operand as Argument);
            }
            else if (operand is Local)
            {
                address = this.GetAddress(operand as Local);
            }
            else if (operand is IR.Operands.Register)
            {
                address = this.GetAddress(operand as IR.Operands.Register);
            }
            else
            {
                throw new NotImplementedEngineException("Wrong '" + operand.ToString() + "' Operand.");
            }

            if (operand.InternalType == InternalType.I1 ||
                operand.InternalType == InternalType.U1)
            {
                address = new ByteMemory(address);
            }
            else if (operand.InternalType == InternalType.I2 ||
                     operand.InternalType == InternalType.U2)
            {
                address = new WordMemory(address);
            }
            else if (operand.InternalType == InternalType.I4 ||
                     operand.InternalType == InternalType.U4 ||
                     operand.InternalType == InternalType.I ||
                     operand.InternalType == InternalType.U ||
                     operand.InternalType == InternalType.ValueType ||
                     operand.InternalType == InternalType.O ||
                     operand.InternalType == InternalType.M ||
                     operand.InternalType == InternalType.SZArray ||
                     operand.InternalType == InternalType.Array)
            {
                address = new DWordMemory(address);
            }
            else if (operand.InternalType == InternalType.I8 ||
                     operand.InternalType == InternalType.U8)
            {
                address = new DWordMemory(address);
            }
            else
            {
                throw new NotImplementedEngineException("'" + operand.InternalType + "' not supported.");
            }

            return(address);
        }
Esempio n. 2
0
		/// <summary>
		/// SUB reg16,mem16
		/// </summary>
		public static void SUB (R16Type target, WordMemory source)
		{
		}
Esempio n. 3
0
		/// <summary>
		/// STR mem16
		/// </summary>
		public static void STR (WordMemory target)
		{
		}
Esempio n. 4
0
		/// <summary>
		/// SLDT mem16
		/// </summary>
		public static void SLDT (WordMemory target)
		{
		}
Esempio n. 5
0
		/// <summary>
		/// SHRD mem16,reg16,imm8
		/// </summary>
		public static void SHRD (WordMemory target, R16Type source, Byte value)
		{
		}
Esempio n. 6
0
		/// <summary>
		/// SHR mem16,CL
		/// </summary>
		public static void SHR__CL (WordMemory target)
		{
		}
Esempio n. 7
0
		/// <summary>
		/// ROL mem16,CL
		/// </summary>
		public static void ROL__CL (WordMemory target)
		{
		}
Esempio n. 8
0
		/// <summary>
		/// POP mem16
		/// </summary>
		public static void POP (WordMemory target)
		{
		}
Esempio n. 9
0
		/// <summary>
		/// FNSTCW mem16
		/// </summary>
		public static void FNSTCW (WordMemory target)
		{
		}
Esempio n. 10
0
		/// <summary>
		/// FLDCW mem16
		/// </summary>
		public static void FLDCW (WordMemory target)
		{
		}
Esempio n. 11
0
		/// <summary>
		/// FISUBR mem16
		/// </summary>
		public static void FISUBR (WordMemory target)
		{
		}
Esempio n. 12
0
		/// <summary>
		/// FISTP mem16
		/// </summary>
		public static void FISTP (WordMemory target)
		{
		}
Esempio n. 13
0
		/// <summary>
		/// FILD mem16
		/// </summary>
		public static void FILD (WordMemory target)
		{
		}
Esempio n. 14
0
		/// <summary>
		/// FIDIVR mem16
		/// </summary>
		public static void FIDIVR (WordMemory target)
		{
		}
Esempio n. 15
0
		/// <summary>
		/// FICOMP mem16
		/// </summary>
		public static void FICOMP (WordMemory target)
		{
		}
Esempio n. 16
0
		/// <summary>
		/// NOT mem16
		/// </summary>
		public static void NOT (WordMemory target)
		{
		}
Esempio n. 17
0
		/// <summary>
		/// FSTSW mem16
		/// </summary>
		public static void FSTSW (WordMemory target)
		{
		}
Esempio n. 18
0
		/// <summary>
		/// PUSH mem16
		/// </summary>
		public static void PUSH (WordMemory target)
		{
		}
Esempio n. 19
0
		/// <summary>
		/// IDIV mem16
		/// </summary>
		public static void IDIV (WordMemory target)
		{
		}
Esempio n. 20
0
		/// <summary>
		/// SBB mem16,imm16
		/// </summary>
		public static void SBB (WordMemory target, UInt16 source)
		{
		}
Esempio n. 21
0
		/// <summary>
		/// IMUL reg16,mem16,imm16
		/// </summary>
		public static void IMUL (R16Type target, WordMemory source, UInt16 value)
		{
		}
Esempio n. 22
0
		/// <summary>
		/// SHR mem16,imm8
		/// </summary>
		public static void SHR (WordMemory target, Byte source)
		{
		}
Esempio n. 23
0
		/// <summary>
		/// INC mem16
		/// </summary>
		public static void INC (WordMemory target)
		{
		}
Esempio n. 24
0
		/// <summary>
		/// SHRD mem16,reg16,CL
		/// </summary>
		public static void SHRD___CL (WordMemory target, R16Type source)
		{
		}
Esempio n. 25
0
		/// <summary>
		/// MOV mem16,segreg
		/// </summary>
		public static void MOV (WordMemory target, SegType source)
		{
		}
Esempio n. 26
0
		/// <summary>
		/// SMSW mem16
		/// </summary>
		public static void SMSW (WordMemory target)
		{
		}
Esempio n. 27
0
		/// <summary>
		/// MOV segreg,mem16
		/// </summary>
		public static void MOV (SegType target, WordMemory source)
		{
		}
Esempio n. 28
0
		/// <summary>
		/// SUB mem16,reg16
		/// </summary>
		public static void SUB (WordMemory target, R16Type source)
		{
		}
Esempio n. 29
0
		/// <summary>
		/// MOVZX reg32,mem16
		/// </summary>
		public static void MOVZX (R32Type target, WordMemory source)
		{
		}
Esempio n. 30
0
		/// <summary>
		/// MUL mem16
		/// </summary>
		public static void MUL (WordMemory target)
		{
		}
Esempio n. 31
0
		/// <summary>
		/// CMPXCHG mem16,reg16
		/// </summary>
		public static void CMPXCHG (WordMemory target, R16Type source)
		{
		}