public void LeaUse() { var cmp = new M68kInstruction { Opcode = M68kOpcode.Lea, Variable = "foobar", AddressingMode1 = M68kAddressingMode.Absolute, AddressingMode2 = M68kAddressingMode.Register, Register2 = new Register { Type = RegType.Address, Number = 2 } }; CollectionAssert.IsEmpty(cmp.Use(RegType.Address)); CollectionAssert.IsEmpty(cmp.Use(RegType.Data)); }
public void AddressLoadUse() { var i = new M68kInstruction { Opcode = M68kOpcode.Move, AddressingMode1 = M68kAddressingMode.Address, Register1 = new Register { Type = RegType.Address, Number = 2 }, AddressingMode2 = M68kAddressingMode.Register, Register2 = new Register { Type = RegType.Data, Number = 1 }, }; CollectionAssert.IsEmpty(i.Use(RegType.Data)); CollectionAssert.AreEquivalent(new[] { "A2", }, i.Use(RegType.Address)); }
public void CmpUse() { var cmp = new M68kInstruction(M68kOpcode.Cmp, new Register { Type = RegType.Data, Number = 1 }, new Register { Type = RegType.Data, Number = 2 }); CollectionAssert.AreEquivalent(new[] { "D1", "D2" }, cmp.Use(RegType.Data)); }
public void TstUse() { var tst = new M68kInstruction { Opcode = M68kOpcode.Tst, Register1 = new Register { Type = RegType.Data, Number = 1 } }; CollectionAssert.AreEquivalent(new[] { "D1" }, tst.Use(RegType.Data)); }