Esempio n. 1
0
        protected Identifier Bsr;     // cached BSR register identifier

        protected PICRewriter(PICArchitecture arch, PICDisassemblerBase disasm, PICProcessorState state, IStorageBinder binder, IRewriterHost host)
        {
            this.arch            = arch;
            this.state           = state;
            this.binder          = binder;
            this.host            = host;
            this.disasm          = disasm;
            dasm                 = disasm.GetEnumerator();
            Wreg                 = GetWReg;
            Bsr                  = GetBsr;
            this.instrCurr       = null !;
            this.m               = null !;
            this.rtlInstructions = null !;
        }
Esempio n. 2
0
        public IEnumerator <RtlInstructionCluster> GetEnumerator()
        {
            while (dasm.MoveNext())
            {
                instrCurr       = dasm.Current;
                iclass          = InstrClass.Linear;
                rtlInstructions = new List <RtlInstruction>();
                m = new RtlEmitter(rtlInstructions);

                RewriteInstr();

                yield return(m.MakeCluster(instrCurr.Address, instrCurr.Length, iclass));
            }
            yield break;
        }
Esempio n. 3
0
        public IEnumerator <RtlInstructionCluster> GetEnumerator()
        {
            while (dasm.MoveNext())
            {
                instrCurr       = dasm.Current;
                rtlc            = RtlClass.Linear;
                rtlInstructions = new List <RtlInstruction>();
                m = new RtlEmitter(rtlInstructions);

                RewriteInstr();

                yield return(new RtlInstructionCluster(instrCurr.Address, instrCurr.Length, rtlInstructions.ToArray())
                {
                    Class = rtlc
                });
            }
            yield break;
        }