예제 #1
0
        public void DeadComment()
        {
            var dead = m.Reg16("dead");

            m.Comment("This is a comment");
            m.Assign(dead, m.Word16(0xDEAD));

            EliminateDeadCode();

            var sExp =
                @"
// This is a comment
";

            AssertProcedureCode(sExp);
        }
예제 #2
0
        public void CoaAcrossComment()
        {
            var a = m.Reg32("a");
            var b = m.Reg32("b");

            m.Assign(a, m.Mem32(m.Word32(0x00123400)));
            m.Comment("This is a comment");
            m.Assign(b, m.Mem32(a));

            RunCoalescer();

            var sExp =
                @"
// This is a comment
b = Mem3[Mem2[0x123400<32>:word32]:word32]
";

            AssertProcedureCode(sExp);
        }