public void X86ic_CompareMemOff_Normalize_Succeed()
        {
            var a   = Create(Opcode.neg, Mem32(Registers.eax, 30));
            var b   = Create(Opcode.neg, Mem32(Registers.ecx, 30));
            var cmp = new X86InstructionComparer(Normalize.Registers);

            Assert.IsTrue(cmp.Equals(a, b));
            Assert.IsTrue(cmp.GetHashCode(a) == cmp.GetHashCode(b));
        }
        public void X86ic_CompareOpcodes()
        {
            var a   = Create(Opcode.nop);
            var b   = Create(Opcode.nop);
            var cmp = new X86InstructionComparer(Normalize.Nothing);

            Assert.IsTrue(cmp.Equals(a, b));
            Assert.IsTrue(cmp.GetHashCode(a) == cmp.GetHashCode(b));
        }
        public void X86ic_CompareRegisters_NoNormalize_Fail()
        {
            var a   = Create(Opcode.neg, "eax");
            var b   = Create(Opcode.neg, "ecx");
            var cmp = new X86InstructionComparer(Normalize.Nothing);

            Assert.IsFalse(cmp.Equals(a, b));
            Assert.IsFalse(cmp.GetHashCode(a) == cmp.GetHashCode(b));
        }
Esempio n. 4
0
        public void X86ic_CompareRegisters_Normalize_Succeed()
        {
            var a   = Create(Mnemonic.neg, "eax");
            var b   = Create(Mnemonic.neg, "ecx");
            var cmp = new X86InstructionComparer(Normalize.Registers);

            Assert.IsTrue(cmp.Equals(a, b));
            Assert.IsTrue(cmp.GetHashCode(a) == cmp.GetHashCode(b));
        }