Beispiel #1
0
        public void DtbSegmentedAccess()
        {
            ProcedureBuilder m = new ProcedureBuilder();

            Identifier ds   = m.Local16("ds");
            Identifier bx   = m.Local16("bx");
            Expression e    = m.SegMem(bx.DataType, ds, m.IAdd(bx, 4));
            var        arch = new Reko.Arch.X86.X86ArchitectureReal();
            Program    prog = new Program
            {
                Architecture = arch,
                Platform     = new DefaultPlatform(null, arch),
            };
            TraitCollector trco = new TraitCollector(factory, store, dtb, prog);

            e = e.Accept(aen);
            e.Accept(eqb);
            e.Accept(trco);
            dtb.BuildEquivalenceClassDataTypes();
            Verify("Typing/DtbSegmentedAccess.txt");
        }
Beispiel #2
0
        public void DtbSegmentedDirectAddress()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            var arch           = new Reko.Arch.X86.X86ArchitectureReal();
            var prog           = new Program
            {
                Architecture = arch,
                Platform     = new DefaultPlatform(null, arch)
            };

            store.EnsureExpressionTypeVariable(factory, prog.Globals);

            Identifier ds = m.Local16("ds");
            Expression e  = m.SegMem(PrimitiveType.Byte, ds, m.Int16(0x0200));

            TraitCollector coll = new TraitCollector(factory, store, dtb, prog);

            e = e.Accept(aen);
            e.Accept(eqb);
            e.Accept(coll);
            dtb.BuildEquivalenceClassDataTypes();
            Verify("Typing/DtbSegmentedDirectAddress.txt");
        }
        public void DtbSegmentedDirectAddress()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            var sc             = new ServiceContainer();
            var arch           = new Reko.Arch.X86.X86ArchitectureReal(sc, "x86-real-16", new Dictionary <string, object>());
            var program        = new Program
            {
                Architecture = arch,
                Platform     = new DefaultPlatform(sc, arch)
            };

            store.EnsureExpressionTypeVariable(factory, 0, program.Globals);

            Identifier ds = m.Local16("ds");
            Expression e  = m.SegMem(PrimitiveType.Byte, ds, m.Word16(0x0200));

            TraitCollector coll = new TraitCollector(factory, store, dtb, program);

            e = e.Accept(aen);
            e.Accept(eqb);
            e.Accept(coll);
            dtb.BuildEquivalenceClassDataTypes();
            Verify("Typing/DtbSegmentedDirectAddress.txt");
        }
Beispiel #4
0
        public void DtbSegmentedDirectAddress()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            var arch = new Reko.Arch.X86.X86ArchitectureReal();
            var prog = new Program
            {
                Architecture = arch,
                Platform = new DefaultPlatform(null, arch)
            };
            store.EnsureExpressionTypeVariable(factory, prog.Globals);

            Identifier ds = m.Local16("ds");
            Expression e = m.SegMem(PrimitiveType.Byte, ds, m.Int16(0x0200));

            TraitCollector coll = new TraitCollector(factory, store, dtb, prog);
            e = e.Accept(aen);
            e.Accept(eqb);
            e.Accept(coll);
            dtb.BuildEquivalenceClassDataTypes();
            Verify("Typing/DtbSegmentedDirectAddress.txt");
        }
Beispiel #5
0
        public void DtbSegmentedAccess()
        {
            ProcedureBuilder m = new ProcedureBuilder();

            Identifier ds = m.Local16("ds");
            Identifier bx = m.Local16("bx");
            Expression e = m.SegMem(bx.DataType, ds, m.IAdd(bx, 4));
            var arch = new Reko.Arch.X86.X86ArchitectureReal();
            Program prog = new Program
            {
                Architecture = arch,
                Platform = new DefaultPlatform(null, arch),
            };
            TraitCollector trco = new TraitCollector(factory, store, dtb, prog);
            e = e.Accept(aen);
            e.Accept(eqb);
            e.Accept(trco);
            dtb.BuildEquivalenceClassDataTypes();
            Verify("Typing/DtbSegmentedAccess.txt");
        }