예제 #1
0
 /// <summary>
 /// Instantiates a base PIC disassembler.
 /// </summary>
 /// <param name="arch">The PIC architecture.</param>
 /// <param name="rdr">The memory reader.</param, Mnemonic>
 protected PICDisassemblerBase(PICArchitecture arch, EndianImageReader rdr)
 {
     this.arch     = arch;
     this.rdr      = rdr;
     this.instrCur = null !;
     this.addrCur  = null !;
 }
예제 #2
0
 /// <summary>
 /// Copy Constructor.
 /// </summary>
 /// <param name="st">The PIC18 state to copy.</param>
 public PICProcessorState(PICProcessorState st) : base(st)
 {
     arch            = st.arch;
     HWStackItems    = st.HWStackItems;
     ValidRegsValues = new Dictionary <PICRegisterStorage, PICRegisterContent>(st.ValidRegsValues);
     ValidRegs       = new HashSet <RegisterStorage>(st.ValidRegs);
 }
예제 #3
0
 private PICProgramPostprocessor(Program prog, PICArchitecture arch)
 {
     program         = prog;
     architecture    = arch;
     newMap          = new SegmentMap(PICProgAddress.Ptr(0));
     renamingCounter = null !;
 }
예제 #4
0
파일: PICRewriter.cs 프로젝트: smx-smx/reko
        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;
        }
예제 #5
0
 /// <summary>
 /// Postprocess the program which has been loaded.
 /// </summary>
 /// <param name="program">The program.</param>
 /// <param name="arch">The architecture of the processor.</param>
 public virtual void PostprocessProgram(Program program, PICArchitecture arch)
 {
     PICProgramPostprocessor.Validate(program, arch);
 }
예제 #6
0
 /// <summary>
 /// Creates the processor state.
 /// </summary>
 /// <param name="arch">The architecture of the processor.</param>
 /// <returns>
 /// The new processor state.
 /// </returns>
 public abstract PICProcessorState CreateProcessorState(PICArchitecture arch);
예제 #7
0
 /// <summary>
 /// Creates the instructions IL rewriter for the target processor.
 /// </summary>
 /// <param name="arch">The architecture of the processor.</param>
 /// <param name="dasm">The disassembler.</param>
 /// <param name="state">The processor state.</param>
 /// <param name="binder">The storage binder.</param>
 /// <param name="host">The host.</param>
 /// <returns>
 /// The new rewriter.
 /// </returns>
 public abstract PICRewriter CreateRewriter(PICArchitecture arch, PICDisassemblerBase dasm, PICProcessorState state, IStorageBinder binder, IRewriterHost host);
예제 #8
0
 /// <summary>
 /// Creates an emulator for the target processor.
 /// </summary>
 /// <param name="arch">The architecture of the processor.</param>
 /// <param name="segmentMap">The memory of the program to be emulated.</param>
 /// <param name="envEmulator">Emulated environment.</param>
 /// <returns>The created emulator.</returns>
 public virtual IProcessorEmulator CreateEmulator(PICArchitecture arch, SegmentMap segmentMap, IPlatformEmulator envEmulator)
 => throw new NotImplementedException();
예제 #9
0
 /// <summary>
 /// Creates a disassembler for the target processor.
 /// </summary>
 /// <param name="arch">The architecture of the processor.</param>
 /// <param name="rdr">The memory image reader.</param>
 /// <returns>
 /// The new disassembler.
 /// </returns>
 public abstract PICDisassemblerBase CreateDisassembler(PICArchitecture arch, EndianImageReader rdr);
예제 #10
0
        protected HashSet <RegisterStorage> ValidRegs;                                 // Validity of registers. Note: if not valid, there is no corresponding entry in 'regs'.

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="arch">The PIC18 target architecture.</param>
        public PICProcessorState(PICArchitecture arch)
        {
            this.arch       = arch;
            ValidRegsValues = new Dictionary <PICRegisterStorage, PICRegisterContent>();
            ValidRegs       = new HashSet <RegisterStorage>();
        }
예제 #11
0
 /// <summary>
 /// Instantiates a base PIC disassembler.
 /// </summary>
 /// <param name="arch">The PIC architecture.</param>
 /// <param name="rdr">The memory reader.</param, Mnemonic>
 protected PICDisassemblerBase(PICArchitecture arch, EndianImageReader rdr)
 {
     this.arch = arch;
     this.rdr  = rdr;
 }
예제 #12
0
 public static Program Validate(Program prog, PICArchitecture arch)
 => new PICProgramPostprocessor(prog ?? throw new ArgumentNullException(nameof(prog)),
예제 #13
0
 public PICOperandConfigBits(PICArchitecture arch, PICProgAddress addr, ushort config) : base(config)
 {
     this.arch = arch;
     this.addr = addr;
 }