Exemplo n.º 1
0
        private void Given_Instrs(RtlBlock block, Action <RtlEmitter> b)
        {
            var instrs = new List <RtlInstruction>();
            var trace  = new RtlEmitter(instrs);

            b(trace);
            block.Instructions.Add(
                new RtlInstructionCluster(
                    block.Address + block.Instructions.Count * 4,
                    4,
                    instrs.ToArray()));
        }
Exemplo n.º 2
0
        private void Given_Instrs(RtlBlock block, Action <RtlEmitter> b)
        {
            var instrs = new List <RtlInstruction>();
            var trace  = new RtlEmitter(instrs);

            b(trace);
            var rtlc = InstrClass.Linear;

            if (instrs.Count == 1)
            {
                rtlc = instrs.First().Class;
            }
            block.Instructions.Add(
                new RtlInstructionCluster(
                    block.Address + (block.Instructions.Count * 4),
                    4,
                    instrs.ToArray())
            {
                Class = rtlc,
            });
        }
Exemplo n.º 3
0
        private RtlBlock Given_Block(ushort uSeg, ushort uOffset)
        {
            var b = new RtlBlock(Address.SegPtr(uSeg, uOffset), $"l{uSeg:X4}_{uOffset:X4}");

            return(b);
        }
Exemplo n.º 4
0
        private RtlBlock Given_Block(uint uAddr)
        {
            var b = new RtlBlock(Address.Ptr32(uAddr), $"l{uAddr:X8}");

            return(b);
        }
Exemplo n.º 5
0
 private Expression Target(RtlBlock block)
 {
     return(((RtlGoto)block.Instructions.Last().Instructions.Last()).Target);
 }