public void DtbSignedCompare() { ProcedureBuilder m = new ProcedureBuilder(); Identifier p = m.Local32("p"); Identifier ds = m.Local16("ds"); ds.DataType = PrimitiveType.SegmentSelector; Identifier ds2 = m.Local16("ds2"); ds.DataType = PrimitiveType.SegmentSelector; m.Assign(ds2, ds); m.Store( m.SegMem(PrimitiveType.Bool, ds, m.Word16(0x5400)), m.Lt(m.SegMemW(ds, m.Word16(0x5404)), m.Word16(20))); m.Store(m.SegMemW(ds2, m.Word16(0x5404)), m.Word16(0)); ProgramBuilder prog = new ProgramBuilder(); prog.Add(m); RunTest(prog.BuildProgram(), "Typing/DtbSignedCompare.txt"); }
public void DtbSegmentedDirectAddress() { ProcedureBuilder m = new ProcedureBuilder(); var arch = new Decompiler.Arch.X86.IntelArchitecture(Decompiler.Arch.X86.ProcessorMode.Real); 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 TrcoSegmentedDirectAddress() { Program prog = CreateProgram(); prog.TypeStore.EnsureExpressionTypeVariable(prog.TypeFactory, prog.Globals); ProcedureBuilder m = new ProcedureBuilder(); Identifier ds = m.Local16("ds"); Expression e = m.SegMem(PrimitiveType.Byte, ds, m.Int16(0x0200)); coll = CreateCollector(prog); e = e.Accept(en); e.Accept(eqb); e.Accept(coll); Verify(null, "Typing/TrcoSegmentedDirectAddress.txt"); }
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 Decompiler.Arch.X86.IntelArchitecture(Decompiler.Arch.X86.ProcessorMode.Real); 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"); }
public void TrcoSegmentedAccess() { ProcedureBuilder m = new ProcedureBuilder(); Identifier ds = m.Local16("ds"); Identifier bx = m.Local16("bx"); Identifier ax = m.Local16("ax"); Expression e = m.SegMem(PrimitiveType.Word16, ds, m.IAdd(bx, 4)); coll = CreateCollector(); e = e.Accept(en); e.Accept(eqb); e.Accept(coll); Verify(null, "Typing/TrcoSegmentedAccess.txt"); }