Пример #1
0
		public void X86Orw32_Register()
		{
			var r = new RegisterOperand(Registers.ebp);
			var id = (Identifier) orw.Transform(null, r, r.Width, state);
			Assert.AreEqual("ebp", id.Name);
			Assert.IsNotNull(proc.Frame.FramePointer);
		}
Пример #2
0
 public PredecrementMemoryOperand Pre(RegisterOperand a)
 {
     return new PredecrementMemoryOperand(null, (AddressRegister) a.Register);
 }
Пример #3
0
 public PostIncrementMemoryOperand Post(RegisterOperand a)
 {
     return new PostIncrementMemoryOperand(null, (AddressRegister) a.Register);
 }
Пример #4
0
 public MemoryOperand Mem(int offset, RegisterOperand rop)
 {
     var a = (AddressRegister) rop.Register;
     return new MemoryOperand(null, a, Constant.Int16((short)offset));
     throw new NotImplementedException();
 }
Пример #5
0
 public Identifier AluRegister(RegisterOperand reg)
 {
     return frame.EnsureRegister(reg.Register);
 }
Пример #6
0
 public void Lea(MachineOperand ea, RegisterOperand aReg)
 {
     Emit(0x41C0 | Ea(ea, 0) | AReg(aReg) << 9);
 }
Пример #7
0
 public void Cmp_l(MachineOperand eaSrc, RegisterOperand dDst)
 {
     Emit(0xB080 | Ea(eaSrc, 0) | DReg(dDst) << 9);
 }
Пример #8
0
 public void Adda_w(MachineOperand eaSrc, RegisterOperand aDst)
 {
     Emit(0xD0C0 | Ea(eaSrc, 0) | AReg(aDst) << 9);
 }
Пример #9
0
 public void Stbu(RegisterOperand rS, short offset, RegisterOperand rA)
 {
     Add(new PowerPcInstruction(Opcode.stbu, rS, Mem(rA, offset), null, false));
 }
Пример #10
0
 public void Stbux(RegisterOperand rS, RegisterOperand rA, RegisterOperand rB)
 {
     Add(new PowerPcInstruction(Opcode.stbux, rS, rA, rB, false));
 }
Пример #11
0
 public void Mtctr(RegisterOperand r)
 {
     Add(new PowerPcInstruction(Opcode.mtctr, r, null, null, false));
 }
Пример #12
0
 public void Lwz(RegisterOperand rD, short offset, RegisterOperand rA)
 {
     Add(new PowerPcInstruction(Opcode.lwz, rD, new MemoryOperand(rD.Register.DataType, rA.Register, Constant.Int16(offset)), null, false));
 }
Пример #13
0
 public void Lis(RegisterOperand r, ushort uimm)
 {
     Add(new PowerPcInstruction(Opcode.oris, r, r, new ImmediateOperand(Constant.Word16(uimm)), false));
 }
Пример #14
0
 public void Add_(RegisterOperand rT, RegisterOperand rA, RegisterOperand rB)
 {
     Add(new PowerPcInstruction(Opcode.add, rT, rA, rB, true));
 }
Пример #15
0
 public void Oris(RegisterOperand rA, RegisterOperand rS, ushort val)
 {
     Add(new PowerPcInstruction(Opcode.oris, rA, rS, new ImmediateOperand(Constant.Word16(val)), false));
 }
Пример #16
0
 public void Add_w(MachineOperand eaSrc, RegisterOperand dDst)
 {
     Emit(0xD040 | Ea(eaSrc, 0) | DReg(dDst) << 9);
 }
Пример #17
0
 public void Add_l(RegisterOperand dSrc, MachineOperand eaDst)
 {
     Emit(0xD080 | Ea(eaDst, 0) | DReg(dSrc) << 9);
 }
Пример #18
0
 private MemoryOperand Mem(RegisterOperand baseReg, short offset)
 {
     return new MemoryOperand(baseReg.Register.DataType, baseReg.Register, Constant.Int16(offset));
 }
Пример #19
0
 public void Bchg(RegisterOperand dSrc, MachineOperand eaDst)
 {
     Emit(0x0140 | DReg(dSrc) << 9 | Ea(eaDst));
 }
Пример #20
0
 private MemoryOperand Mem16(RegisterOperand reg, int offset)
 {
     return new MemoryOperand(PrimitiveType.Word16, reg.Register, Constant.Create(reg.Register.DataType, offset));
 }
Пример #21
0
 public void Cmpa_l(MachineOperand eaSrc, RegisterOperand aDst)
 {
     Emit(0xB1C0 | Ea(eaSrc, 0) | AReg(aDst) << 9);
 }
Пример #22
0
 public MachineOperand Mem(RegisterOperand rop)
 {
     var a = (AddressRegister) rop.Register;
     return new MemoryOperand(null, a);
 }
Пример #23
0
 public void Lsl_l(int c, RegisterOperand dDst)
 {
     Emit(0xE188 | SmallQ(c) << 9 | DReg(dDst));
 }
Пример #24
0
 public void EmitModRM(int reg, RegisterOperand op)
 {
     reg <<= 3;
     emitter.EmitByte(0xC0 | reg | X86Assembler.RegisterEncoding(op.Register));
 }