Esempio n. 1
0
 public Constant CreateConstant(ImmediateOperand imm, PrimitiveType dataWidth)
 {
     if (dataWidth.BitSize > imm.Width.BitSize)
         return Constant.Create(dataWidth, imm.Value.ToInt64());
     else
         return Constant.Create(imm.Width, imm.Value.ToUInt32());
 }
Esempio n. 2
0
 public override Address ImmediateAsAddress(Address address, ImmediateOperand imm)
 {
     return Address.Ptr64(imm.Value.ToUInt64());
 }
Esempio n. 3
0
 public override Address ImmediateAsAddress(Address address, ImmediateOperand imm)
 {
     return Address.SegPtr(address.Selector, imm.Value.ToUInt32());
 }
Esempio n. 4
0
 public abstract Address ImmediateAsAddress(Address address, ImmediateOperand imm);
Esempio n. 5
0
		public void X86Orw32_ImmediateExtend()
		{
			var imm = new ImmediateOperand(Constant.SByte(-1));
			var c = (Constant) orw.Transform(null, imm, PrimitiveType.Word16, state);
			Assert.AreEqual("0xFFFF", c.ToString());
		}
Esempio n. 6
0
		public void X86Orw32_Immediate()
		{
			var imm = new ImmediateOperand(Constant.Word16(0x0003));
			var c = (Constant) orw.Transform(null, imm, imm.Width, state);
			Assert.AreEqual("0x0003", c.ToString());
		}