当前位置: 首页>>代码示例>>C#>>正文


C# ProcedureBuilder.Seq方法代码示例

本文整理汇总了C#中Reko.UnitTests.Mocks.ProcedureBuilder.Seq方法的典型用法代码示例。如果您正苦于以下问题:C# ProcedureBuilder.Seq方法的具体用法?C# ProcedureBuilder.Seq怎么用?C# ProcedureBuilder.Seq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Reko.UnitTests.Mocks.ProcedureBuilder的用法示例。


在下文中一共展示了ProcedureBuilder.Seq方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DtbArrayAccess2

        public void DtbArrayAccess2()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            Identifier ds = m.Local(PrimitiveType.SegmentSelector, "ds");
            Identifier bx = m.Local16("bx");
            Expression e = m.Array(PrimitiveType.Word32, m.Seq(ds, m.Word16(0x300)), m.IMul(bx, 8));
            e.Accept(eqb);

            TraitCollector coll = new TraitCollector(factory, store, dtb, program);
            e.Accept(coll);
            Verify("Typing/DtbArrayAccess2.txt");
        }
开发者ID:nemerle,项目名称:reko,代码行数:12,代码来源:DataTypeBuilderTests.cs

示例2: CEB_SegmentedArray

        public void CEB_SegmentedArray()
        {
            var m = new Reko.UnitTests.Mocks.ProcedureBuilder("CEB_SegmentedArray");
            var aw = new ArrayType(PrimitiveType.Int16, 0);
            var ds = m.Temp(PrimitiveType.SegmentSelector, "ds");
            var bx = m.Temp(PrimitiveType.Word16, "bx");
            var acc =
                m.Array(
                    PrimitiveType.Word16,
                    m.Seq(
                        ds,
                        m.Word16(0x5388)),
                    m.IMul(bx, 2));

            CreateTv(globals, Ptr32(factory.CreateStructureType()), Ptr32(factory.CreateStructureType()));
            CreateTv(ds, Ptr16(factory.CreateStructureType()), Ptr16(factory.CreateStructureType()));
        }
开发者ID:nemerle,项目名称:reko,代码行数:17,代码来源:ComplexExpressionBuilderTests.cs

示例3: TrcoArrayAccess

 public void TrcoArrayAccess()
 {
     ProcedureBuilder m = new ProcedureBuilder();
     Identifier ds = m.Local(PrimitiveType.SegmentSelector, "ds");
     Identifier bx = m.Local16("bx");
     Expression e = m.Array(PrimitiveType.Word32, m.Seq(ds, m.Word16(0x300)), m.IMul(bx, 8));
     coll = CreateCollector();
     e.Accept(eqb);
     e.Accept(coll);
     StringWriter sb = new StringWriter();
     handler.Traits.Write(sb);
     string sExp =
         "T_1 (in ds : selector)" + nl +
         "\ttrait_primitive(selector)" + nl +
         "\ttrait_mem_array(300, 8, 0, T_7)" + nl + 
         "T_2 (in 0x0300 : word16)" + nl +
         "	trait_primitive(word16)" + nl +
         "T_3 (in SEQ(ds, 0x0300) : ptr32)" + nl +
         "	trait_primitive(ptr32)" + nl +
         "T_4 (in bx : word16)" + nl +
         "	trait_primitive(word16)" + nl +
         "	trait_primitive(ui16)" + nl +
         "T_5 (in 0x0008 : word16)" + nl +
         "	trait_primitive(word16)" + nl +
         "	trait_primitive(ui16)" + nl +
         "T_6 (in bx * 0x0008 : word16)" + nl +
         "	trait_primitive(ui16)" + nl +
         "T_7 (in SEQ(ds, 0x0300)[bx * 0x0008] : word32)" + nl +
         "	trait_primitive(word32)" + nl;
     Assert.AreEqual(sExp, sb.ToString());
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:31,代码来源:TraitCollectorTests.cs

示例4: DtbSequenceWithSegment

        public void DtbSequenceWithSegment()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            Identifier ds = m.Local16("ds");
            ds.DataType = PrimitiveType.SegmentSelector;
            m.SegStore(ds, m.Word16(0x0100), m.Seq(ds, m.Word16(0x1234)));

            ProgramBuilder prog = new ProgramBuilder();
            prog.Add(m);
            RunTest(prog.BuildProgram(), "Typing/DtbSequenceWithSegment.txt");
        }
开发者ID:melbcat,项目名称:reko,代码行数:11,代码来源:DataTypeBuilderTests.cs

示例5: DfaUnsignedDiv

        public void DfaUnsignedDiv()
        {
            var m = new ProcedureBuilder();
            var r1 = m.Register(1);
            var r2 = m.Register(2);
            var r2_r1 = m.Frame.EnsureSequence(r2.Storage, r1.Storage, PrimitiveType.Word64);
            var tmp = m.Frame.CreateTemporary(r2_r1.DataType);
            m.Assign(r1, m.LoadDw(m.Word32(0x123400)));
            m.Assign(r2_r1, m.Seq(m.Word32(0), r1));
            m.Assign(tmp, r2_r1);
            m.Assign(r1, m.UDiv(tmp, m.Word32(42)));
            m.Store(m.Word32(0x123404), r1);
            m.Return();

            RunFileTest(m, "Analysis/DfaUnsignedDiv.txt");
        }
开发者ID:relaxar,项目名称:reko,代码行数:16,代码来源:DataFlowAnalysisTests.cs


注:本文中的Reko.UnitTests.Mocks.ProcedureBuilder.Seq方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。