Esempio n. 1
0
        public void FindCond()
        {
            m.Assign(ax, m.IAdd(ax, cx));
            m.Assign(SCZ, m.Cond(ax));
            var block = m.CurrentBlock;

            m.Return();

            var cm = rw.FindConditionOf(block.Statements, 0, ax);

            Assert.AreEqual("SCZ", cm.FlagGroup.ToString());
            Assert.AreEqual(1, cm.StatementIndex);
        }
Esempio n. 2
0
        public void Larw_FindCond()
        {
            Block block = null;

            RunTest(m =>
            {
                m.Assign(ax, m.IAdd(ax, cx));
                m.Assign(SCZ, m.Cond(ax));
                block = m.CurrentBlock;
                m.Return();
            });
            var ax_3 = GetId("ax_3");
            var cm   = rw.FindConditionOf(block.Statements, 0, ax_3);

            Assert.AreEqual("SCZ_4", cm.FlagGroup.ToString());
            Assert.AreEqual("SCZ_4 = cond(ax_3)", cm.Statement.ToString());
        }